Skip to content

Commit

Permalink
Remove the trailing document separator
Browse files Browse the repository at this point in the history
  • Loading branch information
turkenf committed Jun 3, 2023
1 parent f79f70f commit 5d60c45
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/examples/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,11 @@ func (eg *Generator) StoreExamples() error { // nolint:gocyclo
}
}
}

newBuff := bytes.TrimSuffix(buff.Bytes(), []byte("\n---\n\n"))

// no sensitive info in the example manifest
if err := ioutil.WriteFile(pm.ManifestPath, buff.Bytes(), 0600); err != nil {
if err := ioutil.WriteFile(pm.ManifestPath, newBuff, 0600); err != nil {
return errors.Wrapf(err, "cannot write example manifest file %s for resource %s", pm.ManifestPath, rn)
}
}
Expand Down

0 comments on commit 5d60c45

Please sign in to comment.