mirror of
https://github.com/golang/go
synced 2024-09-30 14:28:33 -06:00
cmd/cgo: don't print absolute path in comment
Change-Id: Ib424e14cfaab35d37ebdd084d41151928bfd645e Reviewed-on: https://go-review.googlesource.com/16051 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
a8645e283b
commit
e920f7d5c5
@ -11,6 +11,7 @@ import (
|
|||||||
"go/printer"
|
"go/printer"
|
||||||
"go/token"
|
"go/token"
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -19,7 +20,7 @@ func (p *Package) godefs(f *File, srcfile string) string {
|
|||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
|
|
||||||
fmt.Fprintf(&buf, "// Created by cgo -godefs - DO NOT EDIT\n")
|
fmt.Fprintf(&buf, "// Created by cgo -godefs - DO NOT EDIT\n")
|
||||||
fmt.Fprintf(&buf, "// %s\n", strings.Join(os.Args, " "))
|
fmt.Fprintf(&buf, "// %s %s\n", filepath.Base(os.Args[0]), strings.Join(os.Args[1:], " "))
|
||||||
fmt.Fprintf(&buf, "\n")
|
fmt.Fprintf(&buf, "\n")
|
||||||
|
|
||||||
override := make(map[string]string)
|
override := make(map[string]string)
|
||||||
|
Loading…
Reference in New Issue
Block a user