init
This commit is contained in:
25
debug_hash.go
Normal file
25
debug_hash.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/kevin/go-jdenticon/jdenticon"
|
||||
)
|
||||
|
||||
func main() {
|
||||
testInputs := []string{"test-hash", "example1@gmail.com"}
|
||||
|
||||
for _, input := range testInputs {
|
||||
hash := jdenticon.ToHash(input)
|
||||
fmt.Printf("Input: \"%s\"\n", input)
|
||||
fmt.Printf("Go SHA1: %s\n", hash)
|
||||
|
||||
svg, err := jdenticon.ToSVG(input, 64)
|
||||
if err != nil {
|
||||
fmt.Printf("Error: %v\n", err)
|
||||
} else {
|
||||
fmt.Printf("SVG length: %d\n", len(svg))
|
||||
}
|
||||
fmt.Println("---")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user