Skip to content

Commit

Permalink
fix loading service from codehost will have invalid empty yaml (#3981)
Browse files Browse the repository at this point in the history
* debug logs

Signed-off-by: Min Min <jamsman94@gmail.com>

* change the way we join string

Signed-off-by: Min Min <jamsman94@gmail.com>

---------

Signed-off-by: Min Min <jamsman94@gmail.com>
  • Loading branch information
jamsman94 authored Feb 5, 2025
1 parent fd470c2 commit cdd4891
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/util/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ import (
const separator = "\n---\n"

func CombineManifests(yamls []string) string {
var builder strings.Builder
for _, y := range yamls {
builder.WriteString(separator + y)
}

return builder.String()
return strings.Join(yamls, separator)
}

func SplitManifests(content string) []string {
Expand Down

0 comments on commit cdd4891

Please sign in to comment.