Skip to content

Commit

Permalink
Merge pull request #23 from maier/master
Browse files Browse the repository at this point in the history
v1.0.1
  • Loading branch information
maier authored Oct 6, 2021
2 parents 4591322 + f13b6e7 commit 31e94cd
Show file tree
Hide file tree
Showing 21 changed files with 808 additions and 379 deletions.
66 changes: 66 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
run:
concurrency: 4
timeout: 1m
issues-exit-code: 1
tests: true
skip-dirs-use-default: true
skip-files:
- ".*_mock_test.go$"
allow-parallel-runners: true

# all available settings of specific linters
linters-settings:
govet:
check-shadowing: true
enable-all: true
disable:
- fieldalignment
golint:
min-confidence: 0.8
gofmt:
simplify: true
goimports:
local-prefixes: github.com/circonus-labs,github.com/openhistogram,github.com/circonus
misspell:
locale: US
unused:
check-exported: false
unparam:
check-exported: false

linters:
enable:
- deadcode
- errcheck
- exportloopref
- gocritic
- godot
- godox
#- goerr113
- gofmt
- gosec
- gosimple
- govet
- ineffassign
- megacheck
- misspell
- prealloc
- predeclared
- revive
- staticcheck
- structcheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
#- wrapcheck
disable:
- scopelint # deprecated, replaced by exportloopref
# - golint -- deprecated, replaced by revive
# - gci
disable-all: false
presets:
- bugs
- unused
fast: false
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# v1.0.1

* fix: lint issues
* upd: remove pkg/errors dependency
* add: lint config
* upd: all dependencies

# v1.0.0

* upd: clarify processing metric vs sending log message
Expand Down
File renamed without changes.
29 changes: 28 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
license.text
Copyright © 2018, Circonus, Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name Circonus, Inc. nor the names
of its contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7 changes: 3 additions & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/circonus-labs/circonus-logwatch/internal/config"
"github.com/circonus-labs/circonus-logwatch/internal/config/defaults"
"github.com/circonus-labs/circonus-logwatch/internal/release"
"github.com/pkg/errors"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
Expand All @@ -24,7 +23,7 @@ import (

var cfgFile string

// RootCmd represents the base command when called without any subcommands
// RootCmd represents the base command when called without any subcommands.
var RootCmd = &cobra.Command{
Use: release.NAME,
Short: "A small utility to send metrics extracted from log files to Circonus.",
Expand Down Expand Up @@ -475,7 +474,7 @@ func initConfig() {
}
}

// initLogging initializes zerolog
// initLogging initializes zerolog.
func initLogging(cmd *cobra.Command, args []string) error {
//
// Enable formatted output
Expand Down Expand Up @@ -513,7 +512,7 @@ func initLogging(cmd *cobra.Command, args []string) error {
case "disabled":
zerolog.SetGlobalLevel(zerolog.Disabled)
default:
return errors.Errorf("Unknown log level (%s)", level)
return fmt.Errorf("Unknown log level (%s)", level) //nolint:goerr113
}
}

Expand Down
25 changes: 10 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@ module github.com/circonus-labs/circonus-logwatch
go 1.15

require (
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d
github.com/circonus-labs/circonus-gometrics/v3 v3.1.0
// github.com/hpcloud/tail v1.0.0
github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a
github.com/circonus-labs/circonus-gometrics/v3 v3.4.6
github.com/maier/go-appstats v0.2.0
github.com/nxadm/tail v1.4.4
github.com/pelletier/go-toml v1.8.0
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.19.0
github.com/spf13/afero v1.3.4 // indirect
github.com/spf13/cobra v1.0.0
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.6.0 // indirect
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980
gopkg.in/yaml.v2 v2.3.0
github.com/nxadm/tail v1.4.8
github.com/pelletier/go-toml v1.9.4
github.com/rs/zerolog v1.25.0
github.com/spf13/cobra v1.2.1
github.com/spf13/viper v1.9.0
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20211004093028-2c5d950f24ef
gopkg.in/yaml.v2 v2.4.0
)
Loading

0 comments on commit 31e94cd

Please sign in to comment.