Package Usage: go: github.com/mileusna/conditional
Package conditinal is go/golang replacement for ternary if/else operator
Many languages have ternary operator which makes it easy and short to assign value inline, for example
Unfortunately, Go doesn't have ternary operator so the shortest way to write this code in Go would be
or if you prefere perhapse more readable but longer version
This is where conditional package steps in. It provides fuctions that replaces ternary operator for each basic type in Go
Example:
1 version
Latest release: over 4 years ago
2 dependent packages
View more package details: https://packages.ecosyste.ms/registries/proxy.golang.org/packages/github.com/mileusna/conditional
View more repository details: http://repos.ecosyste.ms/hosts/GitHub/repositories/mileusna%2Fconditional
Dependent Repos 1
beckend/go-config
go-config parsed config files in specific order to generate a validated structSize: 96.7 KB - Last synced: 11 months ago - Pushed: almost 4 years ago

