Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.
/ cool Public archive

Cool library for using better syntax in Go

License

Notifications You must be signed in to change notification settings

Streamer272/cool

Repository files navigation

Cool

Cool library for using better syntax in Go.

Installation

go get -v github.com/Streamer272/cool

Usage

package main

import (
	"fmt"
	"github.com/Streamer272/cool"
)

func main() {
	var s cool.String = cool.NewString("My custom string")
	fmt.Printf("%s\n", s.Replace("string", "syntax sugar library"))

	var i cool.Int = cool.NewIntFromString("69")
	i.Increment()
	fmt.Printf("%d is now equal to 70\n", i)
	i.MustBePositive() // panics if i is zero or lower

	cool.ExitSuccess()
}

License

This project is licensed under MIT license.

Contribution

Contributors are welcome.