Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
func Check(repo, version string)
Check called as goroutine
Example ¶
package main import ( "log/slog" "os" "github.com/LeKovr/go-kit/ver" ) var ( version = "0.0-dev" repo = "git@github.com:LeKovr/dbrpc.git" ) func replace(groups []string, a slog.Attr) slog.Attr { if a.Key == slog.TimeKey { return slog.Attr{} } return a } func main() { logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{ReplaceAttr: replace})) slog.SetDefault(logger) ver.Check(repo, version) }
Output: {"level":"INFO","msg":"App version is outdated","appVersion":"0.0-dev","sourceVersion":"v0.31","sourceUpdated":"2017-10-17T08:56:03Z","sourceLink":" See https://github.com/LeKovr/dbrpc/releases/tag/v0.31"}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.