converter

package
v0.0.99 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package converter provides functions to convert strings to other types: int, float64, bool etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringToBool

func StringToBool(s string) (bool, error)

func StringToFloat32

func StringToFloat32(s string) (float32, error)

func StringToFloat64

func StringToFloat64(s string) (float64, error)

func StringToInt

func StringToInt(s string) (int, error)

func StringToInt16

func StringToInt16(s string) (int16, error)

func StringToInt32

func StringToInt32(s string) (int32, error)

func StringToInt64

func StringToInt64(s string) (int64, error)

func StringToInt8

func StringToInt8(s string) (int8, error)

func StringToIntSlice added in v0.0.92

func StringToIntSlice(s, sep string) ([]int, error)

func StringToTime added in v0.0.64

func StringToTime(s, format string) (time.Time, error)

Types

type ParserError

type ParserError struct {
	ParserType string
	Value      string
	Parent     error
}

func (*ParserError) Error

func (e *ParserError) Error() string

Jump to

Keyboard shortcuts

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