novalagung / gubrak Goto Github PK
View Code? Open in Web Editor NEW⚙️ Golang functional utility library with syntactic sugar. It's like lodash, but for Go
Home Page: https://pkg.go.dev/github.com/novalagung/gubrak
License: MIT License
⚙️ Golang functional utility library with syntactic sugar. It's like lodash, but for Go
Home Page: https://pkg.go.dev/github.com/novalagung/gubrak
License: MIT License
sample code: https://gist.github.com/wnitya2/f0e7ba5c648b7b5b4019da016f5cc425
when collection only contains 1 data, e.g:
data := []HashMap{
{ "name": "tim", "hobby": "stay awake all the time" },
}
result, err := gubrak.OrderBy(data, func(each HashMap) string {
return each["name"]
})
error returns:
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan send]:
github.com/novalagung/gubrak.OrderBy.func1.1(0x4df3c0, 0xc042002400, 0x97, 0xc04203c120)
D:/Go/src/github.com/novalagung/gubrak/collection.go:888 +0xd9
github.com/novalagung/gubrak.OrderBy.func1(0x4df3c0, 0xc042002400, 0x4e8780, 0x510aa0, 0x0, 0x0, 0x0, 0xc0420301c0, 0x0, 0x0)
D:/Go/src/github.com/novalagung/gubrak/collection.go:1048 +0x4e6
github.com/novalagung/gubrak.OrderBy(0x4df3c0, 0xc042002400, 0x4e8780, 0x510aa0, 0x0, 0x0, 0x0, 0xc042068060, 0xc04205bf50, 0x4c9db2, ...)
D:/Go/src/github.com/novalagung/gubrak/collection.go:1054 +0x9d
main.main()
D:/Go/src/github.com/wnitya2/gubrak-error-orderby/main.go:15 +0x1cd
exit status 2
Hello , I'm reading you codes these days,but ,unfortunately i saw some errors in you return values.
For example,the func Concat,the right return value is :[1 2 3 4 4 6 7 8 9]
func TakeRight, the right return value is :[5 6 7 8 9]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.