Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.06 KB

README.md

File metadata and controls

44 lines (30 loc) · 1.06 KB

go.sh

A parser of the Shell Command Language.

pkg.go.dev GitHub Actions Appveyor Codecov

Installation

$ go get -u github.com/hattya/go.sh

Usage

package main

import (
	"fmt"

	"github.com/davecgh/go-spew/spew"
	"github.com/hattya/go.sh/parser"
)

func main() {
	cmd, comments, err := parser.ParseCommand("<stdin>", "echo Hello, World!")
	if err != nil {
		fmt.Println(err)
		return
	}
	spew.Dump(cmd)
	spew.Dump(comments)
}

License

go.sh is distributed under the terms of the MIT License.