golang/xenlight: standardize generated code comment
authorNick Rosbrook <rosbrookn@gmail.com>
Sun, 11 Oct 2020 23:31:25 +0000 (19:31 -0400)
committerWei Liu <wl@xen.org>
Tue, 13 Oct 2020 13:31:06 +0000 (13:31 +0000)
commita95f31376ba4ae911536c647e1a583d144ccab73
tree1bdfb4a90495b2b948d9d0c9718321590d2a4158
parentc60f9e4360ec857bb0164387378e12ae8e66e189
golang/xenlight: standardize generated code comment

There is a standard format for generated Go code header comments, as set
by [1]. Modify gengotypes.py to follow this standard, and use the
additional

  // source: <IDL file basename>

convention used by protoc-gen-go.

This change is motivated by the fact that since 41aea82de2, the comment
would include the absolute path to libxl_types.idl, therefore creating
unintended diffs when generating code across different machines. This
approach fixes that problem.

[1] https://github.com/golang/go/issues/13560

Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
tools/golang/xenlight/gengotypes.py
tools/golang/xenlight/helpers.gen.go
tools/golang/xenlight/types.gen.go