xconv

package module
v0.0.0-...-438a0da Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: MIT Imports: 2 Imported by: 2

README

xconv - Conversions

Copyright (c) 2022, Geert JM Vanderkelen

xconv is a collection of functionality converting data.
It extends whatever is provided by the standard Go library, contains no magic, and probably does offer not more what can be found in various other projects.

License

Distributed under the MIT license. See LICENSE.txt for more information.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignedAsInt64

func SignedAsInt64(n any) int64

SignedAsInt64 returns n as int64. Panics when n is not (a pointer value of) int64, int, int8, int16, int32.

func SignedAsInt64Ptr

func SignedAsInt64Ptr(n any) *int64

SignedAsInt64Ptr returns n as *int64. Panics when n is not (a pointer value of) int64, int, int8, int16, int32.

func StringToBool

func StringToBool(s string) bool

StringToBool returns true if the string s is either "1", "t", "true", "y", "yes", "ok". The string is checked case insensitively.

func UnsignedAsUint64

func UnsignedAsUint64(n any) uint64

UnsignedAsUint64 returns n as uint64. Panics when n is not (a pointer value of) uint64, uint, uint8, uint16, uint32.

func UnsignedAsUint64Ptr

func UnsignedAsUint64Ptr(n any) *uint64

UnsignedAsUint64Ptr returns n as *uint64. Panics when n is not (a pointer value of) uint64, uint, uint8, uint16, uint32.

Types

This section is empty.

Jump to

Keyboard shortcuts

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