diff options
author | Valentin Rothberg <vrothberg@redhat.com> | 2022-03-29 13:07:43 +0200 |
---|---|---|
committer | Valentin Rothberg <vrothberg@redhat.com> | 2022-03-29 13:35:37 +0200 |
commit | 21502987b2318292bf98e3ef502fb4c0cf9a6d58 (patch) | |
tree | 8a2972a6d8ce1d38445ae8be751da3d1cf7a6ff9 /vendor/github.com/hpcloud/tail/util | |
parent | a2d7fb0c66441450c9169bebdefa07993759fa5b (diff) | |
download | podman-21502987b2318292bf98e3ef502fb4c0cf9a6d58.tar.gz podman-21502987b2318292bf98e3ef502fb4c0cf9a6d58.tar.bz2 podman-21502987b2318292bf98e3ef502fb4c0cf9a6d58.zip |
replace hpcloud/tail with nxadm/tail
The hpcloud is not maintained anymore. nxadm is already part of the
dependency chain, so it won't add work for downstream packages.
While testing upcoming changes to the events-file backend, I noticed
that nxadm is shipping required fixes.
[NO NEW TESTS NEEDED]
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/hpcloud/tail/util')
-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 -} |