diff options
Diffstat (limited to 'weed/util')
| -rw-r--r-- | weed/util/compression_test.go | 21 | ||||
| -rw-r--r-- | weed/util/constants.go | 5 | ||||
| -rw-r--r-- | weed/util/constants_4bytes.go | 1 | ||||
| -rw-r--r-- | weed/util/constants_5bytes.go | 1 | ||||
| -rw-r--r-- | weed/util/file_util_non_posix.go | 1 | ||||
| -rw-r--r-- | weed/util/file_util_posix.go | 1 | ||||
| -rw-r--r-- | weed/util/grace/signal_handling.go | 1 | ||||
| -rw-r--r-- | weed/util/grace/signal_handling_notsupported.go | 1 | ||||
| -rw-r--r-- | weed/util/retry.go | 1 |
9 files changed, 10 insertions, 23 deletions
diff --git a/weed/util/compression_test.go b/weed/util/compression_test.go deleted file mode 100644 index b515e8988..000000000 --- a/weed/util/compression_test.go +++ /dev/null @@ -1,21 +0,0 @@ -package util - -import ( - "testing" - - "golang.org/x/tools/godoc/util" -) - -func TestIsGzippable(t *testing.T) { - buf := make([]byte, 1024) - - isText := util.IsText(buf) - - if isText { - t.Error("buf with zeros are not text") - } - - compressed, _ := GzipData(buf) - - t.Logf("compressed size %d\n", len(compressed)) -} diff --git a/weed/util/constants.go b/weed/util/constants.go index 40b3f395d..dc2099d3c 100644 --- a/weed/util/constants.go +++ b/weed/util/constants.go @@ -5,8 +5,9 @@ import ( ) var ( - VERSION = fmt.Sprintf("%s %.02f", sizeLimit, 2.64) - COMMIT = "" + VERSION_NUMBER = fmt.Sprintf("%.02f", 2.65) + VERSION = sizeLimit + " " + VERSION_NUMBER + COMMIT = "" ) func Version() string { diff --git a/weed/util/constants_4bytes.go b/weed/util/constants_4bytes.go index a29d9d3b0..187e33909 100644 --- a/weed/util/constants_4bytes.go +++ b/weed/util/constants_4bytes.go @@ -1,3 +1,4 @@ +//go:build !5BytesOffset // +build !5BytesOffset package util diff --git a/weed/util/constants_5bytes.go b/weed/util/constants_5bytes.go index 91ce4066f..7c6a158cf 100644 --- a/weed/util/constants_5bytes.go +++ b/weed/util/constants_5bytes.go @@ -1,3 +1,4 @@ +//go:build 5BytesOffset // +build 5BytesOffset package util diff --git a/weed/util/file_util_non_posix.go b/weed/util/file_util_non_posix.go index ffcfef6d5..29aecffa6 100644 --- a/weed/util/file_util_non_posix.go +++ b/weed/util/file_util_non_posix.go @@ -1,3 +1,4 @@ +//go:build linux || darwin || freebsd || netbsd || openbsd || plan9 || solaris || zos // +build linux darwin freebsd netbsd openbsd plan9 solaris zos package util diff --git a/weed/util/file_util_posix.go b/weed/util/file_util_posix.go index 22ca60b3b..0bec8abad 100644 --- a/weed/util/file_util_posix.go +++ b/weed/util/file_util_posix.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package util diff --git a/weed/util/grace/signal_handling.go b/weed/util/grace/signal_handling.go index 7cca46764..fc7afcad9 100644 --- a/weed/util/grace/signal_handling.go +++ b/weed/util/grace/signal_handling.go @@ -1,3 +1,4 @@ +//go:build !plan9 // +build !plan9 package grace diff --git a/weed/util/grace/signal_handling_notsupported.go b/weed/util/grace/signal_handling_notsupported.go index 5335915a1..de898159a 100644 --- a/weed/util/grace/signal_handling_notsupported.go +++ b/weed/util/grace/signal_handling_notsupported.go @@ -1,3 +1,4 @@ +//go:build plan9 // +build plan9 package grace diff --git a/weed/util/retry.go b/weed/util/retry.go index e1ad99d54..b7cd278b3 100644 --- a/weed/util/retry.go +++ b/weed/util/retry.go @@ -37,6 +37,7 @@ func RetryForever(name string, job func() error, onErrFn func(err error) bool) { for { err := job() if err == nil { + waitTime = time.Second break } if onErrFn(err) { |
