Skip to content

⚙️ Golang functional utility library with syntactic sugar. It's like lodash, but for Go

License

Notifications You must be signed in to change notification settings

novalagung/gubrak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gubrak v2

Gubrak is Go functional utility library with syntactic sugar. It's like lodash, but for Go Programming language.

Go Report Card Build Status Coverage Status

Installation

The latest version of gubrak is v2. Here are the available method to get this library.

  • Using go get from github, for Go Mod-based project:

    go get -u github.com/novalagung/gubrak/v2
  • Using go get from github, for $GOPATH-based project:

    go get -u github.com/novalagung/gubrak

Usage

Since this library is developed as go module, the versioning system used is the one from Go.

  • For Go Mod-based project:

    import gubrak "github.com/novalagung/gubrak/v2"
  • For $GOPATH-based project:

    import "github.com/novalagung/gubrak"

Documentation

Hello World Example

Lodash for Golang

APIs

Below are the list of available functions on gubrak:

ChunkCompactConcatCountDifferenceDropDropRightEachEachRightFillFilterFindFindIndexFindLastFindLastIndexFirstForEachForEachRightFromPairsGroupByHeadIncludesIndexOfInitialIntersectionIsArrayIsBoolIsChannelIsDateIsEmptyIsEmptyStringIsFloatIsFunctionIsIntIsMapIsNilIsNumericIsPointerIsSliceIsStringIsStructObjectIsTrueIsUintIsZeroNumberJoinKeyByLastLastIndexOfMapNowNthOrderByPartitionPullPullAllPullAtRandomIntRandomStringReduceRejectRemoveReverseSampleSampleSizeShuffleSizeSortByTailTakeTakeRightUnionUniqWithout

Test

go test -cover -race -v ./... 

Contribution

Fork ➜ Create branch ➜ Commit ➜ Push ➜ Pull Requests

License

MIT License