I'm Arne Bahlo, a software engineer from Germany.
bahlo / go-styleguide Goto Github PK
View Code? Open in Web Editor NEW๐ Opinionated Styleguide for the Go language
License: The Unlicense
๐ Opinionated Styleguide for the Go language
License: The Unlicense
I'm Arne Bahlo, a software engineer from Germany.
Considering https://github.com/bahlo/go-styleguide#avoid-deepequal you can give a try to https://godoc.org/github.com/maxatome/go-testdeep :)
Hi๏ผ
when i try to run this snippet (Structured logging):
import "github.com/uber-go/zap"
//...
logger, _ := zap.NewProduction()
defer logger.Sync()
logger.Info("Server started",
zap.Int("port", port),
zap.String("env", env),
)
console output:
main.go:6:2: code in directory D:\golang\src\github.com\uber-go\zap expects import "go.uber.org/zap"
I changed "import github.com/uber-go/zap" to"import go.uber.org/zap" and then the result is right .
Best regards!
jinkun
Don't under-package
there is a problem in example code :
break func main() {
logger := // ...
sc := make(chan os.Signal)
done := make(chan bool)
go func() {
for {
select {
case s := <-sc:
logger.Info("Received signal, stopping application",
zap.String("signal", s.String()))
break //<---this break can not jump out of the loop
default:
time.Sleep(1 * time.Second)
ioutil.WriteFile("foo", []byte("bar"), 0644)
}
}
done <- true //can not handle this
}()
signal.Notify(sc, os.Interrupt, os.Kill)
<-done // Wait for go-routine
}
As the title describes - gometalinter is now deprecated and will be archived on 2019-04-07.
https://github.com/alecthomas/gometalinter
They recommend to switch to https://github.com/golangci/golangci-lint
I think adding go modules to "Dependency management" would be a good idea
As the title says https://github.com/jteeuwen/go-bindata is archived and unmaintained. The original author deleted the account and later someone registered it and just uploaded the library back. There is also some confusion around a go-bindata organization.
So instead of linking it, I would suggest adding a link to this page instead which compares many different libraries: https://tech.townsourced.com/post/embedding-static-files-in-go/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.