Human-friendly durations in PromQL (#7713)
* Add support for user-friendly durations Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>pull/7740/head
parent
9da53391d1
commit
d867491364
@ -0,0 +1,40 @@ |
||||
run: |
||||
# do not run on test files yet |
||||
tests: false |
||||
|
||||
# all available settings of specific linters |
||||
linters-settings: |
||||
errcheck: |
||||
# report about not checking of errors in type assetions: `a := b.(MyStruct)`; |
||||
# default is false: such cases aren't reported by default. |
||||
check-type-assertions: false |
||||
|
||||
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; |
||||
# default is false: such cases aren't reported by default. |
||||
check-blank: false |
||||
|
||||
lll: |
||||
line-length: 100 |
||||
tab-width: 4 |
||||
|
||||
prealloc: |
||||
simple: false |
||||
range-loops: false |
||||
for-loops: false |
||||
|
||||
whitespace: |
||||
multi-if: false # Enforces newlines (or comments) after every multi-line if statement |
||||
multi-func: false # Enforces newlines (or comments) after every multi-line function signature |
||||
|
||||
linters: |
||||
enable: |
||||
- megacheck |
||||
- govet |
||||
disable: |
||||
- maligned |
||||
- prealloc |
||||
disable-all: false |
||||
presets: |
||||
- bugs |
||||
- unused |
||||
fast: false |
@ -1,14 +1,14 @@ |
||||
version: "{build}" |
||||
platform: x64 |
||||
clone_folder: c:\gopath\src\github.com\sirupsen\logrus |
||||
environment: |
||||
GOPATH: c:\gopath |
||||
branches: |
||||
only: |
||||
- master |
||||
install: |
||||
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH% |
||||
- go version |
||||
build_script: |
||||
- go get -t |
||||
- go test |
||||
version: "{build}" |
||||
platform: x64 |
||||
clone_folder: c:\gopath\src\github.com\sirupsen\logrus |
||||
environment: |
||||
GOPATH: c:\gopath |
||||
branches: |
||||
only: |
||||
- master |
||||
install: |
||||
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH% |
||||
- go version |
||||
build_script: |
||||
- go get -t |
||||
- go test |
||||
|
@ -1,16 +1,12 @@ |
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= |
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= |
||||
github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe h1:CHRGQ8V7OlCYtwaKPJi3iA7J+YdNKdo8j7nG5IgDhjs= |
||||
github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= |
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= |
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= |
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= |
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= |
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= |
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= |
||||
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= |
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= |
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= |
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= |
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 h1:I6FyU15t786LL7oL/hn43zqTuEGr4PN7F4XJ1p4E3Y8= |
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= |
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
||||
|
@ -0,0 +1,7 @@ |
||||
// +build js
|
||||
|
||||
package logrus |
||||
|
||||
func isTerminal(fd int) bool { |
||||
return false |
||||
} |
Loading…
Reference in new issue