util

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package util provides some useful functions that don't fit anywhere else.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IP2Int added in v0.1.8

func IP2Int(ip net.IP) uint32

func Int2IP added in v0.1.8

func Int2IP(nn uint32) net.IP

func NewHTTPClient

func NewHTTPClient() *http.Client

NewHTTPClient allocates a preconfigured *http.Client

func StringChunkDelimited added in v0.1.6

func StringChunkDelimited(data string, chunkSize int, sep ...string) []string

StringChunkDelimited is used to split a multiline string into strings with a max size defined as chunkSize. A string of len > chunkSize will not be split.

func StringToFloat64 added in v0.1.5

func StringToFloat64(s string, def float64) float64

StringToFloat64 converts a string to a float64, returning a default values on conversion error

Types

This section is empty.

Jump to

Keyboard shortcuts

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