From cce9a2712cf203e911892f80a3dabc57bbb3afc6 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Tue, 25 Feb 2020 14:20:17 -0800 Subject: [PATCH] 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. --- internal/blueprint/blueprint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/blueprint/blueprint.go b/internal/blueprint/blueprint.go index 81b6c32d9..aa6c6a133 100644 --- a/internal/blueprint/blueprint.go +++ b/internal/blueprint/blueprint.go @@ -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:"-"` }