Explorar o código

codecgen: add build tag to generated code that it is only supported in go 1.6+

Ugorji Nwoke %!s(int64=6) %!d(string=hai) anos
pai
achega
39e69f67bb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      codec/gen.go

+ 1 - 1
codec/gen.go

@@ -277,9 +277,9 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, noExtensions bool,
 		}
 		x.genRefPkgs(t)
 	}
+	x.line("// +build go1.6")
 	if buildTags != "" {
 		x.line("// +build " + buildTags)
-		x.line("")
 	}
 	x.line(`