Created
November 5, 2018 22:45
-
-
Save lisa/b13b7d0f54319e3f3b147d433044a3b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"strings" | |
"github.com/lisa/adventofcode/2017/src/simpleknot" | |
) | |
func stringToChars(str string) []byte { | |
ret := make([]byte, len(str)) | |
for i, char := range strings.Split(str, "") { | |
ret[i] = byte(char[0]) | |
} | |
return ret | |
} | |
func main() { | |
s := simpleknot.New(stringToChars("foobar")) | |
fmt.Println(s.String()) | |
fmt.Println(s.DenseHashToString()) | |
// I can't do s. and get a list of exported stuff | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment