check

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: MIT Imports: 6 Imported by: 1

README

Check Utils

package sample 
import (
	"github.com/optim-kazuhiro-seida/go-advance-type/check"
	"github.com/optim-kazuhiro-seida/go-advance-type/convert"
)
func main () {
    
    check.IsNumber(uint8(1))
    //true
    check.IsPtr(convert.StringPtr("aaa"))
    // true
    check.IsNil(nil)
    // true
    check.IsBool(false)
    // true

    _t := T{Test: "test"}
    check.AreEqualJson(t1, convert.CompactJson(t1))
    // true
    check.AreEqualJson(t1, map[string]interface{}{"Test": "test", "Sample": "sample"}) 
    // true
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreEqualJson added in v1.1.13

func AreEqualJson(data1, data2 interface{}) bool

func IsBool

func IsBool(val interface{}) bool

func IsNil

func IsNil(i interface{}) bool

func IsNumber

func IsNumber(in interface{}) bool

func IsPtr

func IsPtr(in interface{}) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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