github.com/hattya/go.sh@v0.0.0-20240328132134-f53276d95cc6/README.md (about) 1 # go.sh 2 3 A parser of the [Shell Command Language](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html). 4 5 [![pkg.go.dev](https://pkg.go.dev/badge/github.com/hattya/go.sh)](https://pkg.go.dev/github.com/hattya/go.sh) 6 [![GitHub Actions](https://github.com/hattya/go.sh/actions/workflows/ci.yml/badge.svg)](https://github.com/hattya/go.sh/actions/workflows/ci.yml) 7 [![Appveyor](https://ci.appveyor.com/api/projects/status/ptsv6es9dq1nt3k9/branch/master?svg=true)](https://ci.appveyor.com/project/hattya/go-sh) 8 [![Codecov](https://codecov.io/gh/hattya/go.sh/branch/master/graph/badge.svg)](https://codecov.io/gh/hattya/go.sh) 9 10 11 ## Installation 12 13 ```console 14 $ go get -u github.com/hattya/go.sh 15 ``` 16 17 18 ## Usage 19 20 ```go 21 package main 22 23 import ( 24 "fmt" 25 26 "github.com/davecgh/go-spew/spew" 27 "github.com/hattya/go.sh/parser" 28 ) 29 30 func main() { 31 cmd, comments, err := parser.ParseCommand("<stdin>", "echo Hello, World!") 32 if err != nil { 33 fmt.Println(err) 34 return 35 } 36 spew.Dump(cmd) 37 spew.Dump(comments) 38 } 39 ``` 40 41 42 ## License 43 44 go.sh is distributed under the terms of the MIT License.