use the hex trick here as well
This commit is contained in:
parent
0cedf9b7d4
commit
973ace22a0
@ -2,7 +2,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/sha1"
|
"crypto/sha1"
|
||||||
"encoding/hex"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/russross/blackfriday"
|
"github.com/russross/blackfriday"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
@ -52,7 +51,7 @@ func sha1Sum(s string) string {
|
|||||||
h := sha1.New()
|
h := sha1.New()
|
||||||
h.Write([]byte(s))
|
h.Write([]byte(s))
|
||||||
b := h.Sum(nil)
|
b := h.Sum(nil)
|
||||||
return hex.EncodeToString(b)
|
return fmt.Sprintf("%x", b)
|
||||||
}
|
}
|
||||||
|
|
||||||
func mustReadFile(path string) string {
|
func mustReadFile(path string) string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user