conv

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Helper functions for handling conversions between types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringToFloat64

func StringToFloat64(s string) float64

Converts string to float64. Returns NaN if error detected.

func StringToInt

func StringToInt(s string) int

Converts string to int. Returns 0 if error detected.

func StringToTime

func StringToTime(t string) time.Time

Converts string to time.Time object. Time format:

"2006-01-02T15:04:05.000000Z07"

func TimeToString

func TimeToString(t time.Time) string

Converts time.Time object to string. Time format:

"2006-01-02T15:04:05.000000Z07"

func Use

func Use(v interface{}) string

Converts any input type to string representation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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