4 // Copyright 2014 The Go Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style
6 // license that can be found in the LICENSE file.
19 cmd := exec.Command("go", "run", "-ldflags=-X main.tbd hello -X main.overwrite trumped", "linkx.go")
20 out, err := cmd.CombinedOutput()
22 fmt.Println(string(out))
27 want := "hello\ntrumped\n"
30 fmt.Printf("got %q want %q\n", got, want)