aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/build_ignore_leading_bom.txt
blob: 37141f3466b3e7d7ac785d6e5cd909157bb2febe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Per https://golang.org/ref/spec#Source_code_representation:
# a compiler may ignore a UTF-8-encoded byte order mark (U+FEFF)
# if it is the first Unicode code point in the source text.

go list -f 'Imports: {{.Imports}} EmbedFiles: {{.EmbedFiles}}' .
stdout '^Imports: \[embed m/hello\] EmbedFiles: \[.*file\]$'

-- go.mod --
module m

go 1.16
-- m.go --
package main

import (
	_ "embed"

	"m/hello"
)

//go:embed file
var s string

-- hello/hello.go --
package hello

-- file --