utils

package
v0.0.0-...-5951f92 Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Logger return *zap.SugaredLogger

Functions

func Contains

func Contains(s []string, str string) bool

Contains return bool contains checks if a string is present in a slice ref: https://play.golang.org/p/Qg_uv_inCek

func InitLogger

func InitLogger(c *LoggerConfig) *zap.SugaredLogger

InitLogger return nil

init the sugar Log

logger

func MaxInt

func MaxInt(x, y int) int

MaxInt return maximum value

func MaxInt64

func MaxInt64(x, y int64) int64

MaxInt64 return maximum value

func MinInt

func MinInt(x, y int) int

MinInt return minimum value

Types

type LoggerConfig

type LoggerConfig struct {
	Filename   string `json:"filename"`
	MaxSize    int    `json:"maxsize"`
	MaxAge     int    `json:"max_age"`
	MaxBackups int    `json:"max_backups"`
}

LoggerConfig struct

Jump to

Keyboard shortcuts

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