Skip to content

Instantly share code, notes, and snippets.

@da-moon
Last active July 14, 2019 19:25
Show Gist options
  • Save da-moon/ff2f24b645316c560ea37b3be67513db to your computer and use it in GitHub Desktop.
Save da-moon/ff2f24b645316c560ea37b3be67513db to your computer and use it in GitHub Desktop.
https://github.com/asticode/go-astilectron
https://github.com/pavel-v-chernykh/keystore-go
// GenerateStructSetters - if onlyPublic == true , it would only generate
// setters for public fields
func GenerateStructSetters(file *ast.File, onlyPublicFields bool) func(ast.Node) (ast.Node, bool) {
return func(n ast.Node) (ast.Node, bool) {
x, ok := n.(*ast.TypeSpec)
if !ok {
return n, true
}
xx, ok := x.Type.(*ast.StructType)
if !ok {
return n, true
}
// s, ok := x
fields := xx.Fields.List
for _, field := range fields {
if field != nil {
for _, name := range field.Names {
if name != nil {
// comment := field.Doc.Text()
// name := name.Name
switch field.Type.(type) {
case *ast.Ident:
stype := field.Type.(*ast.Ident).Name // The type as a string
tag = ""
if field.Tag != nil {
tag = field.Tag.Value //the tag as a string
}
name := field.Names[0].Name //name as a string
log.Warning(name)
}
}
}
}
}
return n, true
}
}
https://medium.com/go-walkthrough/go-walkthrough-encoding-binary-96dc5d4abb5d
https://stackoverflow.com/questions/10493411/what-is-bit-masking#10493604
http://blog.ralch.com/tutorial/design-patterns/golang-singleton/
https://github.com/CenturyLinkLabs/golang-builder
https://github.com/dreadl0ck/zeus.git
https://github.com/dropbox/godropbox/blob/master/errors/errors.go
https://dave.cheney.net/2014/09/14/go-list-your-swiss-army-knife
https://github.com/go-kit/kit/tree/master/transport/grpc
https://gokit.io/examples/stringsvc.html
https://www.packtpub.com/mapt/book/application_development/9781788390552/32/ch10lvl1sec0072/a-grpc-server-in-go-kit
1 ) Find out if :443 is blocked or not
netstat -aon | findstr :443
2 ) Terminate process PID ( Elevated Power Shell )
Taskkill /PID 26356 /F
----
Run app
https://github.com/mixu/electroshot
https://stackoverflow.com/questions/14923570/create-pdf-from-html-in-golang
https://github.com/SebastiaanKlippert/go-wkhtmltopdf
https://github.com/jung-kurt/gofpdf
https://github.com/unidoc/unidoc
http://polyglot.ninja/golang-making-http-requests/
go get -u -v -d github.com/gogo/protobuf/...
windows
protoc -I=. -I=%GOPATH%/src -I=%GOPATH%/src/github.com/ -I=%GOPATH%/src/github.com/gogo/protobuf/protobuf --gogofaster_out=Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types:. myproto.proto
linux
protoc -I=. -I=$GOPATH/src -I=$GOPATH/src/github.com/ -I=$GOPATH/src/github.com/gogo/protobuf/protobuf --gogofaster_out=Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types:. signatory.proto
protoc -I=. -I=$GOPATH/src -I=$GOPATH/src/github.com/ -I=$GOPATH/src/github.com/gogo/protobuf/protobuf --gofast_out=plugins=grpc:. signatory.proto
https://appliedgo.net/generics/
http://rest-layer.io
iris-go
https://www.systutorials.com/241624/in-golang-how-to-convert-a-string-to-unicode-rune-array-and-back/
https://github.com/O3Labs/switcheo-go
> Go: Install Tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment