Fix Blueprint Revision, it is an integer not a string

This changes it to an int pointer so that the JSON will output null.
This means it needs to be checked for nil or for 0 in go.

0 is not a valid revision in the WELDR response, they always start at 1
and increment for each new revision tag so either way is a valid way
to indicate it isn't set.
This commit is contained in:
Brian C. Lane 2020-02-25 14:20:17 -08:00 committed by Tom Gundersen
parent 2d4e4d14d0
commit cce9a2712c

View file

@ -22,7 +22,7 @@ type Blueprint struct {
type Change struct {
Commit string `json:"commit" toml:"commit"`
Message string `json:"message" toml:"message"`
Revision *string `json:"revision" toml:"revision"`
Revision *int `json:"revision" toml:"revision"`
Timestamp string `json:"timestamp" toml:"timestamp"`
Blueprint Blueprint `json:"-" toml:"-"`
}