/tern

Golang: Ternary operator and some functions

Primary LanguageGoMIT LicenseMIT

tern

Build Status Coverage Status GoDoc

Description

Package Golang with ternary operator

Installation

This package can be installed with the go get command:

go get github.com/arteev/tern

Documentation

Example:

   package main
   import (
   	"fmt"
   	"github.com/arteev/tern"
   )
   func main() {
   	fmt.Println(tern.Op(true,"It's good:)","Oh how bad"))
   }
   package main 
   import (
      	"fmt"
      	"github.com/arteev/tern"
      )
   func main() {
     fmt.Println(tern.Decode(0,-1,"less",1,"great","zero"))
   }

License

MIT

Author

Arteev Aleksey