Skip to content

Commit

Permalink
Merge pull request #548 from jhernand/update_to_metamodel_0_0_50
Browse files Browse the repository at this point in the history
Update to metamodel 0.0.50
  • Loading branch information
jhernand authored Jan 25, 2022
2 parents 265e1eb + 482ab11 commit fa3d977
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ model_version:=v0.0.169
model_url:=https://github.com/openshift-online/ocm-api-model.git

# Details of the metamodel to use:
metamodel_version:=v0.0.49
metamodel_version:=v0.0.50

.PHONY: examples
examples:
Expand Down
9 changes: 8 additions & 1 deletion helpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ func AddValue(query *url.Values, name string, value interface{}) {
if *query == nil {
*query = make(url.Values)
}
query.Add(name, fmt.Sprintf("%v", value))
var text string
switch typed := value.(type) {
case time.Time:
text = typed.UTC().Format(time.RFC3339)
default:
text = fmt.Sprintf("%v", value)
}
query.Add(name, text)
}

// CopyQuery creates a copy of the given set of query parameters.
Expand Down

0 comments on commit fa3d977

Please sign in to comment.