Skip to content

Commit

Permalink
metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
MatousJobanek committed Apr 3, 2024
1 parent b005cd7 commit b39bddd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ require (

require github.com/google/uuid v1.3.0 // indirect

replace github.com/codeready-toolchain/toolchain-common => github.com/matousjobanek/toolchain-common v0.0.0-20240403092205-8439bbc15fa2
replace github.com/codeready-toolchain/toolchain-common => github.com/matousjobanek/toolchain-common v0.0.0-20240403103433-189935dc05ef

require (
cloud.google.com/go v0.97.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,8 @@ github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA=
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/matousjobanek/toolchain-common v0.0.0-20240403092205-8439bbc15fa2 h1:x1PVCNIzpE/iDB4ED/1yAQbXZck0L9uoh9RgTh/nBCM=
github.com/matousjobanek/toolchain-common v0.0.0-20240403092205-8439bbc15fa2/go.mod h1:OJ3L9aaTRMGjxr2WeH/9l6m5OjExwEK3Bp/+P+efoGg=
github.com/matousjobanek/toolchain-common v0.0.0-20240403103433-189935dc05ef h1:MIWToDWnd6pFAhdmAEedy1pYBZhlj3lPTI9aPqEDzLM=
github.com/matousjobanek/toolchain-common v0.0.0-20240403103433-189935dc05ef/go.mod h1:Iat3N+zBZcVgm/HWxa/ltSEoelM/YCXQUvbL9C8OSTw=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
Expand Down
5 changes: 4 additions & 1 deletion pkg/templates/nstemplatetiers/nstemplatetier_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ func CreateOrUpdateResources(ctx context.Context, s *runtime.Scheme, client runt
return errors.Wrapf(err, "unable to load templates")
}
metadata := make(map[string]string)
err = yaml.Unmarshal([]byte(metadataContent), &metadata)
err = yaml.Unmarshal(metadataContent, &metadata)
if err != nil {
return errors.Wrapf(err, "unable to load templates")

Check warning on line 29 in pkg/templates/nstemplatetiers/nstemplatetier_generator.go

View check run for this annotation

Codecov / codecov/patch

pkg/templates/nstemplatetiers/nstemplatetier_generator.go#L29

Added line #L29 was not covered by tests
}
files := map[string][]byte{}
for _, name := range assets.Names() {
if name == "metadata.yaml" {
continue
}
content, err := assets.Asset(name)
if err != nil {
return errors.Wrapf(err, "unable to load templates")
Expand Down

0 comments on commit b39bddd

Please sign in to comment.