easygo

package module
v0.0.0-...-f2a2498 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2018 License: MIT Imports: 7 Imported by: 2

README

bruno gopher

easy come easy go!

Little convert helpers for things that easy go.

Documentation:

GoDoc

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RandomLetters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")

RandomLetters used for Random Generating functions

Functions

func BoolToPtr

func BoolToPtr(b bool) *bool

BoolToPtr Converts to a Pointer

func ByteToPtr

func ByteToPtr(b byte) *byte

ByteToPtr Converts to a Pointer

func BytesToPtr

func BytesToPtr(b []byte) *[]byte

BytesToPtr Converts to a Pointer

func Float32ToPtr

func Float32ToPtr(f float32) *float32

Float32ToPtr Converts to a Pointer

func Float64ToPtr

func Float64ToPtr(f float64) *float64

Float64ToPtr Converts to a Pointer

func IPv4AddressInString

func IPv4AddressInString(s string) bool

IPv4AddressInString checks if string contains an IPv4 address

func IPv4ExtractFromString

func IPv4ExtractFromString(s string) string

IPv4ExtractFromString extracts an IPv4 from a string

func Int32ToPtr

func Int32ToPtr(i int32) *int32

Int32ToPtr Converts to a Pointer

func Int64ToPtr

func Int64ToPtr(i int64) *int64

Int64ToPtr Converts to a Pointer

func IntToPtr

func IntToPtr(i int) *int

IntToPtr Converts to a Pointer

func IntsToPtr

func IntsToPtr(i []int) *[]int

IntsToPtr Converts to a Pointer

func IsIPv4

func IsIPv4(host string) bool

IsIPv4 Retruns true if string is an IPv4

func PtrToBool

func PtrToBool(b *bool) bool

PtrToBool converts *bool to bool, if nil false is returned

func PtrToByte

func PtrToByte(b *byte) byte

PtrToByte converts *byte to byte, if nil a empty byte is returned

func PtrToBytes

func PtrToBytes(b *[]byte) []byte

PtrToBytes converts *[]byte to []byte, if nil a empty []byte is returned

func PtrToFloat64

func PtrToFloat64(f *float64) float64

PtrToFloat64 converts *float64 to float64, if nil 0 is returned

func PtrToInt

func PtrToInt(i *int) int

PtrToInt converts *int to int, if nil 0 is returned

func PtrToInt32

func PtrToInt32(i *int32) int32

PtrToInt32 converts *int32 to int32, if nil 0 is returned

func PtrToInt64

func PtrToInt64(i *int64) int64

PtrToInt64 converts *int64 to int64, if nil 0 is returned

func PtrToInts

func PtrToInts(i *[]int) []int

PtrToInts converts *int to int, if nil 0 is returned

func PtrToString

func PtrToString(s *string) string

PtrToString converts *string to string, if nil a empty string is returned

func PtrToStrings

func PtrToStrings(s *[]string) []string

PtrToStrings converts *[]string to []string, if nil a empty string slice is returned

func RandomIDwithPrefix

func RandomIDwithPrefix(prefix string, length int) string

RandomIDwithPrefix generates random Letters with Prefix (letters can be modified by overwriting easygo.RandomLetters)

func StringReverse

func StringReverse(s string) (reversedString string)

StringReverse reversed a string

func StringStrip

func StringStrip(str, chr string) string

StringStrip strips chars from a string

func StringToInt

func StringToInt(s string) (int, error)

StringToInt Converts to a Pointer

func StringToPtr

func StringToPtr(s string) *string

StringToPtr Converts to a Pointer

func StringToXXHash

func StringToXXHash(s string) string

StringToXXHash Retuns a hash for a String

func StringsToPtr

func StringsToPtr(s []string) *[]string

StringsToPtr Converts to a Pointer

Types

This section is empty.

Jump to

Keyboard shortcuts

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