mirror of
https://github.com/golang/go
synced 2024-11-18 16:14:46 -07:00
423eeaeda5
Adds a "-tags" flag that'll allow build tags to be passed in and added to the very top of the generated and bundled file. For example, when generating h2_bundle.go for net/http, we'll now be able to do: bundle -tags '!nethttpomithttp2' -o h2_bundle.go -prefix http2 golang.org/x/net/http2 Updates golang/go#35082 Change-Id: I55edd7227aec8641b60ba560c79e0d50d0692d52 Reviewed-on: https://go-review.googlesource.com/c/tools/+/205017 Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
65 lines
834 B
Plaintext
65 lines
834 B
Plaintext
// +build tag
|
|
|
|
// Code generated by golang.org/x/tools/cmd/bundle. DO NOT EDIT.
|
|
// $ bundle
|
|
|
|
// The package doc comment
|
|
//
|
|
|
|
package dest
|
|
|
|
import (
|
|
"fmt"
|
|
. "fmt"
|
|
_ "fmt"
|
|
renamedfmt "fmt"
|
|
renamedfmt2 "fmt"
|
|
|
|
"domain.name/importdecl"
|
|
)
|
|
|
|
// init functions are not renamed
|
|
func init() { prefixfoo() }
|
|
|
|
// Type S.
|
|
type prefixS struct {
|
|
prefixt
|
|
u int
|
|
} /* multi-line
|
|
comment
|
|
*/
|
|
|
|
// non-associated comment
|
|
|
|
/*
|
|
non-associated comment2
|
|
*/
|
|
|
|
// Function bar.
|
|
func prefixbar(s *prefixS) {
|
|
fmt.Println(s.prefixt, s.u) // comment inside function
|
|
}
|
|
|
|
// file-end comment
|
|
|
|
type prefixt int // type1
|
|
|
|
// const1
|
|
const prefixc = 1 // const2
|
|
|
|
func prefixfoo() {
|
|
fmt.Println(importdecl.F())
|
|
}
|
|
|
|
// zinit
|
|
const (
|
|
prefixz1 = iota // z1
|
|
prefixz2 // z2
|
|
) // zend
|
|
|
|
func prefixbaz() {
|
|
renamedfmt.Println()
|
|
renamedfmt2.Println()
|
|
Println()
|
|
}
|