Skip to content

Commit 937c7b0

Browse files
committed
Run go fmt
1 parent 842073e commit 937c7b0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

template.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"bytes"
5+
"crypto/sha1"
56
"encoding/json"
67
"errors"
78
"fmt"
@@ -15,7 +16,6 @@ import (
1516
"strings"
1617
"syscall"
1718
"text/template"
18-
"crypto/sha1"
1919
)
2020

2121
func exists(path string) (bool, error) {
@@ -67,7 +67,7 @@ func dict(values ...interface{}) (map[string]interface{}, error) {
6767
return nil, errors.New("invalid dict call")
6868
}
6969
dict := make(map[string]interface{}, len(values)/2)
70-
for i := 0; i < len(values); i+=2 {
70+
for i := 0; i < len(values); i += 2 {
7171
key, ok := values[i].(string)
7272
if !ok {
7373
return nil, errors.New("dict keys must be strings")
@@ -83,7 +83,7 @@ func hashSha1(input string) string {
8383
return fmt.Sprintf("%x", h.Sum(nil))
8484
}
8585

86-
func marshalJson(input interface{}) (string,error) {
86+
func marshalJson(input interface{}) (string, error) {
8787
var buf bytes.Buffer
8888
enc := json.NewEncoder(&buf)
8989
if err := enc.Encode(input); err != nil {

template_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func TestDict(t *testing.T) {
138138
}
139139

140140
func TestSha1(t *testing.T) {
141-
sum := hashSha1("/path")
141+
sum := hashSha1("/path")
142142
if sum != "4f26609ad3f5185faaa9edf1e93aa131e2131352" {
143143
t.Fatal("Incorrect SHA1 sum")
144144
}

0 commit comments

Comments
 (0)