h

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 7 Imported by: 0

README

h

go helpers for easy use

Install

go get github.com/ego4u/h

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(filename string) (bool, error)

func Map2Struct

func Map2Struct(data, result any) error

func Poe

func Poe(err error)

Poe 如果有错误,则 panic 并终止程序。 If there is an error, panic and terminate the program.

func ReadLineByLine

func ReadLineByLine(fileName string, lineHandle func(line []byte) error) error

func ReadLineByLine0

func ReadLineByLine0(fileName string, lineHandle func(line []byte) error, maxLineSize int, delim byte) error

Types

type JsonGet

type JsonGet struct {
	Obj any
	// contains filtered or unexported fields
}

func NewJsonGet

func NewJsonGet(jsonString string) (*JsonGet, error)

func (*JsonGet) Get

func (r *JsonGet) Get(jsonPath string) ([]any, error)

func (*JsonGet) Get0

func (r *JsonGet) Get0(jsonPath string) any

func (*JsonGet) GetA

func (r *JsonGet) GetA(jsonPath string) any

Jump to

Keyboard shortcuts

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