parse

package
v0.0.0-...-6d82c9b Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: MIT, Unlicense Imports: 4 Imported by: 0

Documentation

Overview

Package parse implements text parsing for common data types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Date

func Date(s string) (date time.Time, err error)

Date parses a time object from a textual dd/mm/yyyy format.

func Day

func Day(s string) (time.Duration, error)

Day parses a day from digit characters.

func FieldRequired

func FieldRequired(s string) (string, error)

FieldRequired ensures that a string is not empty.

func Float

func Float(s string) (float64, error)

Float parses a floating point number from digit characters.

func FormatTime

func FormatTime(t time.Time) string

FormatTime formats a time object into a string.

func Int

func Int(s string) (int, error)

Int parses an integer from digit characters.

func Uint

func Uint(s string) (uint, error)

Uint parses an unsigned integer from digit characters.

Types

This section is empty.

Jump to

Keyboard shortcuts

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