utils

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureSentryException

func CaptureSentryException(name string, hub sentryHub, err error)

CaptureSentryException is a helper function that captures an exception with the given name and error. The main purpose of this function is to rewrite the exception type to the given name. In Sentry, the exception type is always the name of the error type, which is errors.*something* and is not very useful.

func ParseDate

func ParseDate(dateString Datable) (time.Time, error)

ParseDate parses a date string into a time.Time object in UTC.

func ReplaceUnicodeSymbols

func ReplaceUnicodeSymbols(s string) string

ReplaceUnicodeSymbols replaces Unicode escape sequences with their corresponding characters.

func StrValueToFloat

func StrValueToFloat(value string) float64

Types

type Datable

type Datable interface{}

Datable is a type that can be parsed into a date (hopefully).

Jump to

Keyboard shortcuts

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