Text file src/cmd/go/testdata/script/build_ignore_leading_bom.txt

     1  # Per https://golang.org/ref/spec#Source_code_representation:
     2  # a compiler may ignore a UTF-8-encoded byte order mark (U+FEFF)
     3  # if it is the first Unicode code point in the source text.
     4  
     5  go list -f 'Imports: {{.Imports}} EmbedFiles: {{.EmbedFiles}}' .
     6  stdout '^Imports: \[embed m/hello\] EmbedFiles: \[.*file\]$'
     7  
     8  -- go.mod --
     9  module m
    10  
    11  go 1.16
    12  -- m.go --
    13  package main
    14  
    15  import (
    16  	_ "embed"
    17  
    18  	"m/hello"
    19  )
    20  
    21  //go:embed file
    22  var s string
    23  
    24  -- hello/hello.go --
    25  package hello
    26  
    27  -- file --
    28  

View as plain text