github.com/aristanetworks/goarista@v0.0.0-20240514173732-cca2755bbd44/cmd/importsort/testdata/test.go.gold (about) 1 // Copyright (c) 2017 Arista Networks, Inc. 2 // Use of this source code is governed by the Apache License 2.0 3 // that can be found in the COPYING file. 4 5 package main 6 7 import ( 8 "bytes" 9 "strings" 10 11 "foobar" 12 "foobar/baz" 13 14 "cvshub.com/foobar/import" 15 ) 16 17 import ( 18 "bytes" 19 "strings" 20 21 "foobar" 22 "foobar/baz" 23 24 "cvshub.com/foobar/import" 25 26 "cvshub.com/other/import" 27 ) 28 29 func foobar() {} 30 31 import ( 32 z "bytes" 33 "strings" 34 35 "foobar" 36 _ "foobar/baz" // in line comment 37 . "foobar/qux" // in line comment 38 39 "cvshub.com/foobar/import" 40 ) 41 import ( 42 "bytes" 43 44 "cvshub.com/foobar/import" 45 ) 46 import ( 47 "cvshub.com/foobar/import" 48 ) 49 50 func main() { 51 foobar() 52 }