mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-20 20:10:22 +00:00
91774fc936
Uses github.com/libopenstorage/secrets to communicate with Vault. This removes the need for maintaining our own limited Vault APIs. By adding the new dependency, several other packages got updated in the process. Unused indirect dependencies have been removed from go.mod. Signed-off-by: Niels de Vos <ndevos@redhat.com>
30 lines
526 B
Go
30 lines
526 B
Go
//+build go1.10
|
|
|
|
package lz4
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
)
|
|
|
|
func (h Header) String() string {
|
|
var s strings.Builder
|
|
|
|
s.WriteString(fmt.Sprintf("%T{", h))
|
|
if h.BlockChecksum {
|
|
s.WriteString("BlockChecksum: true ")
|
|
}
|
|
if h.NoChecksum {
|
|
s.WriteString("NoChecksum: true ")
|
|
}
|
|
if bs := h.BlockMaxSize; bs != 0 && bs != 4<<20 {
|
|
s.WriteString(fmt.Sprintf("BlockMaxSize: %d ", bs))
|
|
}
|
|
if l := h.CompressionLevel; l != 0 {
|
|
s.WriteString(fmt.Sprintf("CompressionLevel: %d ", l))
|
|
}
|
|
s.WriteByte('}')
|
|
|
|
return s.String()
|
|
}
|