Minimal wrapper around some STD actions in Go... To make them quicker than ever!
package main
import (
"fmt"
"github.com/jD91mZM2/stdutil"
"regexp"
"strings"
)
func main() {
stdutil.ShouldTrace = true
fmt.Print("Name: ")
name := stdutil.MustScanLower()
if ok, _ := regexp.MatchString("[0-9]+", name); ok {
stdutil.PrintErr("Name can't contain numbers!!!", nil)
return
}
fmt.Println("Hello, " + strings.Title(name))
}Also check out its GoDocs!
Should be as easy as
go get github.com/jD91mZM2/stdutil