github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/libraries/golang/lint/testdata/blank-import-lib.go (about)

     1  // Test that blank imports in library packages are flagged.
     2  
     3  // Package foo ...
     4  package foo
     5  
     6  // The instructions need to go before the imports below so they will not be
     7  // mistaken for documentation.
     8  
     9  /* MATCH /blank import/ */ import _ "encoding/json"
    10  
    11  import (
    12  	"fmt"
    13  
    14  	/* MATCH /blank import/ */ _ "os"
    15  
    16  	/* MATCH /blank import/ */ _ "net/http"
    17  	_ "path"
    18  )
    19  
    20  import _ "encoding/base64" // Don't gripe about this
    21  
    22  import (
    23  	// Don't gripe about these next two lines.
    24  	_ "compress/zlib"
    25  	_ "syscall"
    26  
    27  	/* MATCH /blank import/ */ _ "path/filepath"
    28  )
    29  
    30  import (
    31  	"go/ast"
    32  	_ "go/scanner" // Don't gripe about this or the following line.
    33  	_ "go/token"
    34  )
    35  
    36  var (
    37  	_ fmt.Stringer // for "fmt"
    38  	_ ast.Node     // for "go/ast"
    39  )