Building
go build -o goencrypt main.go
go build -o goencrypt main.go
package main | |
import ( | |
"errors" | |
"fmt" | |
"io" | |
"strings" | |
) | |
func main() { |
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: |
package main | |
import ( | |
"errors" | |
"fmt" | |
"io" | |
"strings" | |
"sync" | |
"time" | |
) |
package stdinMaybe | |
import ( | |
"bytes" | |
"errors" | |
"io" | |
"os" | |
"time" | |
) |
package main | |
import ( | |
"go/ast" | |
"go/parser" | |
"go/token" | |
"os" | |
"reflect" | |
) |
package main | |
import("fmt") | |
type MyStruct struct{ | |
x string | |
} | |
type MyTypedSlice []*MyStruct | |
func (f *MyTypedSlice) Add(s *MyStruct) *MyTypedSlice { |
// data url decoding to png | |
package main | |
import ( | |
"fmt" | |
"bytes" | |
"github.com/vincent-petithory/dataurl" | |
"image/png" | |
) |
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) | |
} |
package main | |
import ( | |
"fmt" | |
"os" | |
// "bytes" | |
// "encoding/base64" | |
"github.com/mh-cbon/stream/stream3" | |
) |