helper

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: MIT Imports: 6 Imported by: 3

Documentation

Overview

Package helper 收集一些可以辅助我们快速编程的方法,让我们极快的编写出自己的应用程序。 一些脚手架函数在特殊的情况让我少处理很多程序问题,还能标准化我们编写程序的方式,我认为这是极好的。

该函数可能会限制一些自定义的东西,如果你喜欢完全可以用在自己的程序中, 如果你不是很喜欢这种处理方法, 你可以拷贝该函数的在自己的程序中创建新函数,并去改善和定制它的处理方式。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool added in v1.3.0

func Bool(v bool) *bool

Bool 返回 bool 的指针类型

func Byte added in v1.3.0

func Byte(v byte) *byte

Byte 返回 byte 的指针类型

func Complex128 added in v1.3.0

func Complex128(v complex128) *complex128

Complex128 返回 complex128 的指针类型

func Complex64 added in v1.3.0

func Complex64(v complex64) *complex64

Complex64 返回 complex64 的指针类型

func Float32 added in v1.3.0

func Float32(v float32) *float32

Float32 返回 float32 的指针类型

func Float64 added in v1.3.0

func Float64(v float64) *float64

Float64 返回 float64 的指针类型

func Int added in v1.3.0

func Int(v int) *int

Int 返回 int 的指针类型

func Int16 added in v1.3.0

func Int16(v int16) *int16

Int16 返回 int16 的指针类型

func Int32 added in v1.3.0

func Int32(v int32) *int32

Int32 返回 int32 的指针类型

func Int64 added in v1.3.0

func Int64(v int64) *int64

Int64 返回 int64 的指针类型

func Int8 added in v1.3.0

func Int8(v int8) *int8

Int8 返回 int8 的指针类型

func Must

func Must(i interface{}, err error) interface{}

Must is a generic helper that act just like template.Must (go doc template.Must)

func PanicRecover

func PanicRecover(r interface{}) error

PanicRecover 帮助把 panic 转为 error返回,并获取堆栈信息打印日志。 该方法会把错误信息打印到标准错误输出,并包含一段堆栈信息,帮助我们快速查找程序问题。

func Rune added in v1.3.0

func Rune(v rune) *rune

Rune 返回 rune 的指针类型

func String added in v1.3.0

func String(v string) *string

String 返回 string 的指针类型

func Uint added in v1.3.0

func Uint(v uint) *uint

Uint 返回 uint 的指针类型

func Uint16 added in v1.3.0

func Uint16(v uint16) *uint16

Uint16 返回 uint16 的指针类型

func Uint32 added in v1.3.0

func Uint32(v uint32) *uint32

Uint32 返回 uint32 的指针类型

func Uint64 added in v1.3.0

func Uint64(v uint64) *uint64

Uint64 返回 uint64 的指针类型

func Uint8 added in v1.3.0

func Uint8(v uint8) *uint8

Uint8 返回 uint8 的指针类型

Types

This section is empty.

Jump to

Keyboard shortcuts

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