Skip to content

Commit 9c7f099

Browse files
committed
add missing
1 parent 0b9b592 commit 9c7f099

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cmd/template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func handleFile(relativePath string) {
127127

128128
err := templateFile(relativePath)
129129

130-
if err != nil {
130+
if err != nil && !supress {
131131
fmt.Println("error templating:", err.Error())
132132
}
133133
}

utils/get/get.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ func Remote(key string) string {
1515
_, err := url.Parse(key)
1616

1717
if err != nil {
18-
fmt.Println("error parsing url:", err)
18+
fmt.Println("error parsing url:", err.Error())
1919
return "invalid url: " + key
2020
}
2121

2222
response, err := http.Get(key)
2323
if err != nil {
24-
fmt.Println("error requesting remote:", err)
24+
fmt.Println("error requesting remote:", err.Error())
2525
return "remote failed: " + key
2626
}
2727
defer response.Body.Close()
2828

2929
body, err := io.ReadAll(response.Body)
3030
if err != nil {
31-
fmt.Println("error reading body:", err)
31+
fmt.Println("error reading body:", err.Error())
3232
return "body malformed: " + key
3333
}
3434

@@ -46,13 +46,13 @@ func Local(key, context string) string {
4646
data, err := os.ReadFile(fullPath)
4747

4848
if err != nil {
49-
fmt.Println("error reading file:", err)
49+
fmt.Println("error reading file:", err.Error())
5050
return "file not found: " + fullPath
5151
}
5252

5353
return string(data)
5454
} else {
55-
fmt.Println("error reading file:", err)
55+
fmt.Println("error reading file:", err.Error())
5656
return "invalid path: " + fullPath
5757
}
5858
}

0 commit comments

Comments
 (0)