diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-03-29 16:41:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 16:41:47 +0200 |
commit | 0eff4b70d0429c0dd1d95bc0a15f679cef351cb5 (patch) | |
tree | de6c66409ca20c10c1500cfa0057421afbb489bd /vendor/github.com/hpcloud/tail/util/util.go | |
parent | 83d0729146dc4616e180c8d36ffd90de093b8617 (diff) | |
parent | 21502987b2318292bf98e3ef502fb4c0cf9a6d58 (diff) | |
download | podman-0eff4b70d0429c0dd1d95bc0a15f679cef351cb5.tar.gz podman-0eff4b70d0429c0dd1d95bc0a15f679cef351cb5.tar.bz2 podman-0eff4b70d0429c0dd1d95bc0a15f679cef351cb5.zip |
Merge pull request #13686 from vrothberg/nxadm
replace hpcloud/tail with nxadm/tail
Diffstat (limited to 'vendor/github.com/hpcloud/tail/util/util.go')
-rw-r--r-- | vendor/github.com/hpcloud/tail/util/util.go | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/vendor/github.com/hpcloud/tail/util/util.go b/vendor/github.com/hpcloud/tail/util/util.go deleted file mode 100644 index 54151fe39..000000000 --- a/vendor/github.com/hpcloud/tail/util/util.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2015 HPE Software Inc. All rights reserved. -// Copyright (c) 2013 ActiveState Software Inc. All rights reserved. - -package util - -import ( - "fmt" - "log" - "os" - "runtime/debug" -) - -type Logger struct { - *log.Logger -} - -var LOGGER = &Logger{log.New(os.Stderr, "", log.LstdFlags)} - -// fatal is like panic except it displays only the current goroutine's stack. -func Fatal(format string, v ...interface{}) { - // https://github.com/hpcloud/log/blob/master/log.go#L45 - LOGGER.Output(2, fmt.Sprintf("FATAL -- "+format, v...)+"\n"+string(debug.Stack())) - os.Exit(1) -} - -// partitionString partitions the string into chunks of given size, -// with the last chunk of variable size. -func PartitionString(s string, chunkSize int) []string { - if chunkSize <= 0 { - panic("invalid chunkSize") - } - length := len(s) - chunks := 1 + length/chunkSize - start := 0 - end := chunkSize - parts := make([]string, 0, chunks) - for { - if end > length { - end = length - } - parts = append(parts, s[start:end]) - if end == length { - break - } - start, end = end, end+chunkSize - } - return parts -} |