Skip to content

Commit

Permalink
fix: dont print header if no deps
Browse files Browse the repository at this point in the history
  • Loading branch information
b1ek committed Jul 30, 2024
1 parent 94e0eea commit 8cd4d46
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions template.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ type Template struct {

func gencode(deps []string) string {

if len(deps) == 0 {
return ""
}

rdc := Template{args.DepsVarName, "'" + strings.Join(deps, "' '") + "'", !args.ExposeDeps}
tmpl, err := template.New("").Parse(bin)
if err != nil {
Expand Down

0 comments on commit 8cd4d46

Please sign in to comment.