Discover Packages
github.com/louvri/gob
module
Version:
v0.0.2
Opens a new window with list of versions in this module.
Published: Jan 11, 2024
License: MIT
Opens a new window with license information.
README
README
¶
gob
gob
is a library that provides common golang's object process.
This README is still not fully completed yet, will be updated shortly.
The codes were co-created with @johnjerrico , published here so it can be used publicly.
Installation
Get the code with:
$ go get github.com/louvri/gob
Usage
Array/Slice
...
source := []string{"A", "B", "C", "D"}
...
indexMap := arr.Index(source)
if indexMap["A"] {
...
}
...
Object
...
if !object.IsEmpty(objB) {
err := object.Assign(objA, prop, object.Get(objB))
if err != nil {
fmt.Println(err)
}
}
...
String
...
if tmp := str.SplitOnNotEmpty("id:desc", ":"); len(tmp) > 0 {
...
}
...
Expand ▾
Collapse ▴
Directories
¶
Click to show internal directories.
Click to hide internal directories.