diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-09-23 07:27:30 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-09-23 07:29:31 -0700 |
commit | d00207ff482fd5cfa607d37979b5455f41a86e3b (patch) | |
tree | 618b977ecaa896174e32c445cda99efac23e1f1f /tools/go_marshal/gomarshal | |
parent | 99decaadd6da0df2d8ec70ddea9d754c9d71a584 (diff) |
Internal change.
PiperOrigin-RevId: 333287864
Diffstat (limited to 'tools/go_marshal/gomarshal')
-rw-r--r-- | tools/go_marshal/gomarshal/generator_interfaces_struct.go | 3 |
1 files changed, 3 insertions, 0 deletions
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 } |