package
Version:
v1.5.1
Opens a new window with list of versions in this module.
Published: Mar 31, 2021
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
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
¶
func AreEqualJson(data1, data2 interface{}) bool
func IsBool(val interface{}) bool
func IsNil(i interface{}) bool
func IsNumber(in interface{}) bool
func IsPtr(in interface{}) bool
Source Files
¶
Click to show internal directories.
Click to hide internal directories.