duancu4731
duancu4731
2011-06-25 16:16

什么是“。” (点或句点)在Go import语句中做什么?

  • import

In the Go tutorial, and most of the Go code I've looked at, packages are imported like this:

import (
    "fmt"
    "os"
    "launchpad.net/lpad"
    ...
)

But in http://bazaar.launchpad.net/~niemeyer/lpad/trunk/view/head:/session_test.go, the gocheck package is imported with a . (period):

import (
    "http"
    . "launchpad.net/gocheck"
    "launchpad.net/lpad"
    "os"    
)

What is the significance of the . (period)?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答