Skip to content

Commit

Permalink
Merge pull request #21 from kilosonc/fix/createcluster
Browse files Browse the repository at this point in the history
fix: no data in gitops repo
  • Loading branch information
kilosonc authored Feb 16, 2023
2 parents c1721d1 + cc62d73 commit b25f657
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cluster/gitrepo/gitrepo_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -1286,11 +1286,13 @@ func assembleTags(templateName string,
}

func marshal(b *[]byte, err *error, data interface{}) {
buf := bytes.NewBuffer(*b)
buf := bytes.NewBuffer(make([]byte, 0))
encoder := yaml.NewEncoder(buf)
encoder.SetIndent(2)
*err = encoder.Encode(data)
if (*err) != nil {
*err = perror.Wrap(herrors.ErrParamInvalid, (*err).Error())
} else {
*b = buf.Bytes()
}
}

0 comments on commit b25f657

Please sign in to comment.