github.com/yanyiwu/go@v0.0.0-20150106053140-03d6637dbb7f/test/bom.go (about)

     1  // runoutput
     2  
     3  // Copyright 2011 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  // Test source file beginning with a byte order mark.
     8  
     9  package main
    10  
    11  import (
    12  	"fmt"
    13  	"strings"
    14  )
    15  
    16  func main() {
    17  	prog = strings.Replace(prog, "BOM", "\uFEFF", -1)
    18  	fmt.Print(prog)
    19  }
    20  
    21  var prog = `BOM
    22  package main
    23  
    24  func main() {
    25  }
    26  `