Back to

Package internal

Latest Go to latest

The latest major version is .

Published: Sep 23, 2020 | License: GPL3 | Module:



var (
	ErrSentryEmptyParam = errors.New("[err] sentry empty params")
var (
	ErrorEmptyParams = errors.New("[err] empty params")

func DailyStringToTime

func DailyStringToTime(s string) time.Time

DailyStringToTime converts string formatted daily layout to time.

func GenerateBadge

func GenerateBadge(leftText, leftBgColor, rightText, rightBgColor string, edgeFlat bool) badge.Badge

GenerateBadge makes Flat-Badge struct which is used go-counter-badge/badge.

func GetRoot

func GetRoot() string

GetRoot returns root path.

func HourlyStringToTime

func HourlyStringToTime(s string) time.Time

HourlyStringToTime converts string formatted hourly layout to time.

func InitSentry

func InitSentry(sentryDSN, environment, release, hostname string, stack, debug bool) error

InitSentry is to initialize Sentry setting.

func MonthlyStringToTime

func MonthlyStringToTime(s string) time.Time

MonthlyStringToTime converts string formatted monthly layout to time.

func NewLogger

func NewLogger(dir, filename string) (*log.Logger, error)

NewLogger is to create a logger object for Echo platform.

func ParseURL

func ParseURL(s string) (schema, host, port, path, query, fragment string, err error)

ParseURL parses url.

func SentryError

func SentryError(err error)

Error sends an error to Sentry.

func SentryErrorWithContext

func SentryErrorWithContext(err error, ctx echo.Context, info map[string]string)

ErrorWithEcho sends an error with the Echo of context information to the Sentry.

func StringInSlice

func StringInSlice(str string, list []string) bool

StringInSlice checks a string element is included to string array.

func StringToTime

func StringToTime(s string) time.Time

StringToTime converts string to time.

func TimeToDailyStringFormat

func TimeToDailyStringFormat(t time.Time) string

TimeToDailyStringFormat converts time to string formatted daily layout

func TimeToHourlyStringFormat

func TimeToHourlyStringFormat(t time.Time) string

TimeToHourlyStringFormat converts time to string formatted hourly layout

func TimeToMonthlyStringFormat

func TimeToMonthlyStringFormat(t time.Time) string

TimeToMonthlyStringFormat converts time to string formatted monthly layout.

func TimeToString

func TimeToString(t time.Time) string

TimeToString converts time to string.

func TimeToYearlyStringFormat

func TimeToYearlyStringFormat(t time.Time) string

TimeToYearlyStringFormat converts time to string formatted yearly layout.

func TimestampByMaxTime

func TimestampByMaxTime() int64

TimestampByMaxTime returns max unix nano.

func YearlyStringToTime

func YearlyStringToTime(s string) time.Time

YearlyStringToTime converts string formatted yearly layout to time.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier