gob

module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT

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 {
          ...
      }
      ...
    

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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