diff --git a/wsdlgo/encoder.go b/wsdlgo/encoder.go index 5198c40..267118c 100644 --- a/wsdlgo/encoder.go +++ b/wsdlgo/encoder.go @@ -28,6 +28,8 @@ import ( "golang.org/x/net/html/charset" ) +const fileHeader = "// Code generated by wsdl2go. DO NOT EDIT." + // An Encoder generates Go code from WSDL definitions. type Encoder interface { // Encode generates Go code from d. @@ -224,7 +226,7 @@ func (ge *goEncoder) encode(w io.Writer, d *wsdl.Definitions) error { } } - fmt.Fprintf(w, "package %s\n\nimport (\n", ge.packageName) + fmt.Fprintf(w, "%s\n\npackage %s\n\nimport (\n", fileHeader, ge.packageName) for pkg := range ge.needsStdPkg { fmt.Fprintf(w, "%q\n", pkg) } diff --git a/wsdlgo/testdata/arrayexample.golden b/wsdlgo/testdata/arrayexample.golden index 9cb5033..be8e571 100644 --- a/wsdlgo/testdata/arrayexample.golden +++ b/wsdlgo/testdata/arrayexample.golden @@ -1,3 +1,5 @@ +// Code generated by wsdl2go. DO NOT EDIT. + package stockquotesoapbinding import ( diff --git a/wsdlgo/testdata/data.golden b/wsdlgo/testdata/data.golden index 8063e85..5cd49ca 100644 --- a/wsdlgo/testdata/data.golden +++ b/wsdlgo/testdata/data.golden @@ -1,3 +1,5 @@ +// Code generated by wsdl2go. DO NOT EDIT. + package dataendpointhttpbinding import ( diff --git a/wsdlgo/testdata/data_withkeyword.golden b/wsdlgo/testdata/data_withkeyword.golden index 8063e85..5cd49ca 100644 --- a/wsdlgo/testdata/data_withkeyword.golden +++ b/wsdlgo/testdata/data_withkeyword.golden @@ -1,3 +1,5 @@ +// Code generated by wsdl2go. DO NOT EDIT. + package dataendpointhttpbinding import ( diff --git a/wsdlgo/testdata/localimport.golden b/wsdlgo/testdata/localimport.golden index aeb4ddf..e36d887 100644 --- a/wsdlgo/testdata/localimport.golden +++ b/wsdlgo/testdata/localimport.golden @@ -1,3 +1,5 @@ +// Code generated by wsdl2go. DO NOT EDIT. + package stockquotesoapbinding import ( diff --git a/wsdlgo/testdata/localimport_choice.golden b/wsdlgo/testdata/localimport_choice.golden index f3f8551..4131fa5 100644 --- a/wsdlgo/testdata/localimport_choice.golden +++ b/wsdlgo/testdata/localimport_choice.golden @@ -1,3 +1,5 @@ +// Code generated by wsdl2go. DO NOT EDIT. + package stockquotesoapbinding import ( diff --git a/wsdlgo/testdata/memcache.golden b/wsdlgo/testdata/memcache.golden index 18eeff8..cbbaef9 100644 --- a/wsdlgo/testdata/memcache.golden +++ b/wsdlgo/testdata/memcache.golden @@ -1,3 +1,5 @@ +// Code generated by wsdl2go. DO NOT EDIT. + package memoryservice import ( diff --git a/wsdlgo/testdata/soap12wcf.golden b/wsdlgo/testdata/soap12wcf.golden index 1f73d21..ba205fd 100644 --- a/wsdlgo/testdata/soap12wcf.golden +++ b/wsdlgo/testdata/soap12wcf.golden @@ -1,3 +1,5 @@ +// Code generated by wsdl2go. DO NOT EDIT. + package testsoap12binding import ( diff --git a/wsdlgo/testdata/tpexample1.golden b/wsdlgo/testdata/tpexample1.golden index 9ee2ac1..56629b6 100644 --- a/wsdlgo/testdata/tpexample1.golden +++ b/wsdlgo/testdata/tpexample1.golden @@ -1,3 +1,5 @@ +// Code generated by wsdl2go. DO NOT EDIT. + package hello_binding import ( diff --git a/wsdlgo/testdata/w3cexample1.golden b/wsdlgo/testdata/w3cexample1.golden index 84dd6b0..a1b7f2a 100644 --- a/wsdlgo/testdata/w3cexample1.golden +++ b/wsdlgo/testdata/w3cexample1.golden @@ -1,3 +1,5 @@ +// Code generated by wsdl2go. DO NOT EDIT. + package internal import ( diff --git a/wsdlgo/testdata/w3cexample2.golden b/wsdlgo/testdata/w3cexample2.golden index 6f8a843..0a3cb25 100644 --- a/wsdlgo/testdata/w3cexample2.golden +++ b/wsdlgo/testdata/w3cexample2.golden @@ -1,3 +1,5 @@ +// Code generated by wsdl2go. DO NOT EDIT. + package internal import ( diff --git a/wsdlgo/testdata/w3example1.golden b/wsdlgo/testdata/w3example1.golden index 3511508..5836a43 100644 --- a/wsdlgo/testdata/w3example1.golden +++ b/wsdlgo/testdata/w3example1.golden @@ -1,3 +1,5 @@ +// Code generated by wsdl2go. DO NOT EDIT. + package endorsementsearchsoapbinding import ( diff --git a/wsdlgo/testdata/w3example2.golden b/wsdlgo/testdata/w3example2.golden index 09509a0..b4fa266 100644 --- a/wsdlgo/testdata/w3example2.golden +++ b/wsdlgo/testdata/w3example2.golden @@ -1,3 +1,5 @@ +// Code generated by wsdl2go. DO NOT EDIT. + package stockquotesoapbinding import (