go build -o goencrypt main.go
This file contains hidden or 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 ( | |
| "errors" | |
| "fmt" | |
| "io" | |
| "strings" | |
| ) | |
| func main() { |
This file contains hidden or 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
| type Equer interface { | |
| Eq(right Equer) bool | |
| } | |
| func Eq(left <T:BasicKind|*BasicKind|Equer>, right T) bool { | |
| switch T.(kind){ | |
| case BasicKind: | |
| return left == right | |
| case *BasicKind: | |
| return left!=nil && right!=nil && *left == *right | |
| case Equer: |
This file contains hidden or 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 ( | |
| "errors" | |
| "fmt" | |
| "io" | |
| "strings" | |
| "sync" | |
| "time" | |
| ) |
This file contains hidden or 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 stdinMaybe | |
| import ( | |
| "bytes" | |
| "errors" | |
| "io" | |
| "os" | |
| "time" | |
| ) |
This file contains hidden or 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 ( | |
| "go/ast" | |
| "go/parser" | |
| "go/token" | |
| "os" | |
| "reflect" | |
| ) |
This file contains hidden or 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") | |
| type MyStruct struct{ | |
| x string | |
| } | |
| type MyTypedSlice []*MyStruct | |
| func (f *MyTypedSlice) Add(s *MyStruct) *MyTypedSlice { |
This file contains hidden or 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
| // data url decoding to png | |
| package main | |
| import ( | |
| "fmt" | |
| "bytes" | |
| "github.com/vincent-petithory/dataurl" | |
| "image/png" | |
| ) |
This file contains hidden or 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 | |
| func main () { | |
| get := watcher.HotTemplateReloader("a.tmpl", "b.tmpl") | |
| // following should be thread safe, and do the hot reload of t template instance | |
| t, err := get() | |
| if err!=nil { | |
| panic(err) | |
| } |
This file contains hidden or 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" | |
| "os" | |
| // "bytes" | |
| // "encoding/base64" | |
| "github.com/mh-cbon/stream/stream3" | |
| ) |
NewerOlder