Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 371 Bytes

README.md

File metadata and controls

26 lines (20 loc) · 371 Bytes

breflect

API

  • IsNil 判断是否为nil

EXAMPLE

package main

import (
	"fmt"
	"github.com/songzhibin97/go-baseutils/base/breflect"
)

func main() {
	var a int
	fmt.Println(breflect.IsNil(a)) // false
	var b int
	fmt.Println(breflect.IsNil(&b)) // false
	var c *int
	fmt.Println(breflect.IsNil(c))  // true
	fmt.Println(breflect.IsNil(&c)) // true
}