utils

package
v0.0.0-...-78b4d1b Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DriverName - Default driver name for HANA DB from SAP
	DriverName = "hdb"

	// IndoCoy - Default coy for Indo
	IndoCoy = `` /* 548-byte string literal not displayed */

	// AfricaCoy - Default coy for Africa
	AfricaCoy = `'BC', 'EY', 'BZ', 'OU'`
)

Variables

This section is empty.

Functions

func BigIntToFloat

func BigIntToFloat(sign bool, m *big.Int, exp int) float64

BigIntToFloat - Convert to float

func ConvertByteToStr

func ConvertByteToStr(b []byte, bi big.Int) string

ConvertByteToStr = ConvertByteToStr

func DecodeDecimal

func DecodeDecimal(b []byte, m *big.Int) (bool, int)

DecodeDecimal - Copy code from SAP drive to enable decode Decimals

func ReadConfig

func ReadConfig(p string) (string, string, error)

ReadConfig - Read config from ini files

func ReadCsv

func ReadCsv(f string, comma rune) (rec [][]string, count int)

ReadCsv - Read CSV file and return as string slice

func WriteMsg

func WriteMsg(s string)

WriteMsg - Just a wrapper of fmt.Print()

Types

type NullTime

type NullTime struct {
	time.Time
	Valid bool
}

NullTime - Nullable time.Time

func (*NullTime) Scan

func (nt *NullTime) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullTime) Value

func (nt NullTime) Value() (driver.Value, error)

Value implements the driver Valuer interface.

Jump to

Keyboard shortcuts

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