go-hesabu

command module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2018 License: MIT Imports: 6 Imported by: 0

README

Maintainability Go Report Card

go-hesabu

go-hesabu is golang equivalent to hesabu

Usage

Taking equations

{
  "c": "a + 10 * b",
  "b": "10+a",
  "a": "10"
}

logs the solution

go run hesabu.go ./test/small.json

or via the piped version

cat ./test/small.json | go run hesabu.go

you will get

{
  "a": 10,
  "b": 20,
  "c": 210,
}

Development

Development setup

require a go 1.9 and dep

mkdir -p $GOPATH/src/github.com/BLSQ
cd $GOPATH/src/github.com/BLSQ
git clone git@github.com:BLSQ/go-hesabu.git
cd go-hesabu
dep ensure
go test github.com/BLSQ/go-hesabu/hesabu -coverprofile=coverage.out
go tool cover -html=coverage.out
go run hesabu.go ./test/small.json

For more info see workspace structure in https://golang.org/doc/code.html

build the cli

go build -ldflags="-s -w" -o hesabucli hesabu.go; mv hesabucli ../hesabu/bin

for mac

GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o hesabucli hesabu.go

Dependencies

relies on

License

The code is available as open source under the terms of the MIT License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL