damoonazarpazhooh
10/12/2018 - 5:55 PM

GO

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
http://blog.ralch.com/tutorial/design-patterns/golang-singleton/
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
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
https://github.com/mixu/electroshot
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/O3Labs/switcheo-go
https://stackoverflow.com/questions/10493411/what-is-bit-masking#10493604
https://medium.com/go-walkthrough/go-walkthrough-encoding-binary-96dc5d4abb5d
https://github.com/asticode/go-astilectron
https://github.com/pavel-v-chernykh/keystore-go
https://appliedgo.net/generics/
https://github.com/CenturyLinkLabs/golang-builder
https://github.com/dreadl0ck/zeus.git
http://polyglot.ninja/golang-making-http-requests/
https://dave.cheney.net/2014/09/14/go-list-your-swiss-army-knife
https://github.com/dropbox/godropbox/blob/master/errors/errors.go
https://www.systutorials.com/241624/in-golang-how-to-convert-a-string-to-unicode-rune-array-and-back/

// 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
	}
}