...

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

Documentation: cmd/go/testdata/script

     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
     5go list -f 'Imports: {{.Imports}} EmbedFiles: {{.EmbedFiles}}' .
     6stdout '^Imports: \[embed m/hello\] EmbedFiles: \[.*file\]$'
     7
     8-- go.mod --
     9module m
    10
    11go 1.16
    12-- m.go --
    13package main
    14
    15import (
    16	_ "embed"
    17
    18	"m/hello"
    19)
    20
    21//go:embed file
    22var s string
    23
    24-- hello/hello.go --
    25package hello
    26
    27-- file --

View as plain text