utils

package
v0.0.0-...-f651441 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BUILDTIME string

BUILDTIME should be populated by at build time: -ldflags "-w -X github.com/amadeusitgroup/redis-operator/pkg/utils.BUILDTIME=${DATE} with for example DATE=$(shell date +%Y-%m-%d/%H:%M:%S ) (pay attention not to use space!)

View Source
var COMMIT string

COMMIT should be populated by at build time: -ldflags "-w -X github.com/amadeusitgroup/redis-operator/pkg/utils.COMMIT=${COMMIT} with for example COMMIT=$(shell git rev-parse HEAD)

TAG should be populated by at build time: -ldflags "-w -X github.com/amadeusitgroup/redis-operator/pkg/utils.TAG=${TAG} with for example TAG=$(shell git tag|tail -1)

View Source
var VERSION string

VERSION should be populated by at build time: -ldflags "-w -X github.com/amadeusitgroup/redis-operator/pkg/utils.VERSION=${VERSION} with for example VERSION=$(shell git rev-parse --abbrev-ref HEAD)

Functions

func BuildInfos

func BuildInfos()

BuildInfos returns builds information

func SliceJoin

func SliceJoin(a []Stringer, sep string) string

SliceJoin concatenates the elements of a to create a single string. The separator string sep is placed between elements in the resulting string.

Types

type LogWriter

type LogWriter struct {
	// contains filtered or unexported fields
}

LogWriter struct representation of a log writter, containing the pointer of the logging function

func NewLogWriter

func NewLogWriter(f func(args ...interface{})) *LogWriter

NewLogWriter create a new LogWriter with the pointer of the logging function in input

func (LogWriter) Write

func (w LogWriter) Write(p []byte) (n int, err error)

Write implements the standard Write interface: it writes using the logging function

type Stringer

type Stringer interface {
	String() string
}

Stringer implement the string interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL