cuelang.org/go@v0.13.0/cue/format/testdata/imports.txtar (about)

     1  #sort-imports
     2  
     3  -- pkgonly.input --
     4  package foo
     5  -- out/format/pkgonly.golden --
     6  package foo
     7  -- attronly.input --
     8  @attr(foo)
     9  -- out/format/attronly.golden --
    10  @attr(foo)
    11  -- importonly.input --
    12  import "foo"
    13  -- out/format/importonly.golden --
    14  import "foo"
    15  -- imports.input --
    16  package foo
    17  
    18  import (
    19      "cuelang.org/go/foo"
    20      "cuelang.org/go/bar"
    21      "time"
    22  )
    23  
    24  import (
    25      time1 "time"
    26  
    27      // comment f2
    28      f2 "cuelang.org/go/foo"
    29      f1 "cuelang.org/go/foo"
    30  )
    31  
    32  import (
    33      time2 "time"
    34  
    35      same "cuelang.org/go/foo" // comment 1
    36      same2 "cuelang.org/go/foo" // comment 2
    37  )
    38  
    39  
    40  a: time.time
    41  b: foo.foo
    42  c: bar.Bar
    43  -- out/format/imports.golden --
    44  package foo
    45  
    46  import (
    47  	"cuelang.org/go/foo"
    48  	"cuelang.org/go/bar"
    49  	"time"
    50  )
    51  
    52  import (
    53  	time1 "time"
    54  
    55  	// comment f2
    56  	f2 "cuelang.org/go/foo"
    57  	f1 "cuelang.org/go/foo"
    58  )
    59  
    60  import (
    61  	time2 "time"
    62  
    63  	same "cuelang.org/go/foo"  // comment 1
    64  	same2 "cuelang.org/go/foo" // comment 2
    65  )
    66  
    67  a: time.time
    68  b: foo.foo
    69  c: bar.Bar