From d00207ff482fd5cfa607d37979b5455f41a86e3b Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Wed, 23 Sep 2020 07:27:30 -0700 Subject: Internal change. PiperOrigin-RevId: 333287864 --- tools/go_marshal/gomarshal/generator_interfaces_struct.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/go_marshal/gomarshal') diff --git a/tools/go_marshal/gomarshal/generator_interfaces_struct.go b/tools/go_marshal/gomarshal/generator_interfaces_struct.go index d3fc1c1c6..456662fab 100644 --- a/tools/go_marshal/gomarshal/generator_interfaces_struct.go +++ b/tools/go_marshal/gomarshal/generator_interfaces_struct.go @@ -20,6 +20,7 @@ package gomarshal import ( "fmt" "go/ast" + "sort" "strings" ) @@ -40,6 +41,8 @@ func (g *interfaceGenerator) areFieldsPackedExpression() (string, bool) { for accessor, _ := range g.as { cs = append(cs, fmt.Sprintf("%s.Packed()", accessor)) } + // Sort expressions for determinstic build outputs. + sort.Strings(cs) return strings.Join(cs, " && "), true } -- cgit v1.2.3