console
This is a lightweight replacement for the fmt package, reduces the binary size by roughly 400kb in a hello world program.
Please note: This package achieves smaller binaries primarily by not relying on reflection. So if your program does use reflection itself then this won't benefit you much.
Getting Started
Installing
To start using wire, install Go and run go get
:
$ go get -u github.com/hk-32/console
This will retrieve the library. Specifically the v1.0.0 right now. Works perfecly fine with modules.
Examples
Hello World:
package main
import "github.com/hk-32/console/out"
func main() {
out.WriteLine("Hello World")
}
Or get some user input:
package main
import (
"github.com/hk-32/console/out"
"github.com/hk-32/console/in"
)
func main() {
// name := in.ReadLine()
name := in.Input("Please enter your name: ")
out.WriteLine("Hello", name)
}
Contact
Hassan Khan: [email protected]
License
console
source code is available under the MIT License.