Shared common code for my Go projects.
Create a custom rs/zerolog console logger:
package main
import (
"context"
commonlog "github.com/revett/common/log"
"github.com/rs/zerolog/log"
)
func main() {
log.Logger = commonlog.New()
ctx := context.Background()
// log.Info().Msg("...")
// log.Fatal().Err(err).Send()
}
Update the golangci/golangci-lint within a repo:
curl -o .golangci.yml https://raw.githubusercontent.com/revett/dotfiles/main/.golangci.yml