issmirnov / docker-tag-yoinker Goto Github PK
View Code? Open in Web Editor NEWUpdater utility for docker tags
License: MIT License
Updater utility for docker tags
License: MIT License
When we run the binary specifying a config file that doesn't exist, we get a crash.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x49b555]
goroutine 1 [running]:
bytes.(*Buffer).WriteTo(0xc0000972f0, 0x0, 0x0, 0x0, 0x0, 0xc0000c4940)
/home/travis/.gimme/versions/go1.14.6.linux.amd64/src/bytes/buffer.go:239 +0x85
github.com/rs/zerolog.ConsoleWriter.Write(0x0, 0x0, 0x0, 0x0, 0x0, 0xc0000c4940, 0x4, 0x4, 0x0, 0x0, ...)
/home/travis/gopath/src/github.com/rs/zerolog/console.go:116 +0x349
github.com/rs/zerolog.levelWriterAdapter.WriteLevel(...)
/home/travis/gopath/src/github.com/rs/zerolog/writer.go:20
github.com/rs/zerolog.(*Event).write(0xc0000b2720, 0x3f, 0x1f4)
/home/travis/gopath/src/github.com/rs/zerolog/event.go:76 +0x122
github.com/rs/zerolog.(*Event).msg(0xc0000b2720, 0xc00009a2d0, 0x4b)
/home/travis/gopath/src/github.com/rs/zerolog/event.go:140 +0x210
github.com/rs/zerolog.(*Event).Msgf(0xc0000b2720, 0x756944, 0x1e, 0xc00010fde8, 0x1, 0x1)
/home/travis/gopath/src/github.com/rs/zerolog/event.go:127 +0x83
github.com/issmirnov/docker-tag-yoinker/config.LoadConfig(0x7ffd377a0994, 0xf, 0x9d1ac0, 0x2, 0x0)
/home/travis/gopath/src/github.com/issmirnov/docker-tag-yoinker/config/config.go:15 +0x20c
main.main()
/home/travis/gopath/src/github.com/issmirnov/docker-tag-yoinker/main.go:52 +0x1d4
I need to check the LoadConfig method and ensure the file exists.
Version lock all your deps.
Since we want to use this in scripts, we should return a non zero exit code + empty string if no valid version is found. Log messages should go to stderr, while only the version goes to stdout.
Currently, the error case shown when no config file is found is "Sorry, but no tags match the rules set in your config file.".
We should really check for the existence of the config file in the init loader phase.
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.