Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sno6/gommand
Easily run Go code straight from your terminal.
https://github.com/sno6/gommand
Last synced: about 2 months ago
JSON representation
Easily run Go code straight from your terminal.
- Host: GitHub
- URL: https://github.com/sno6/gommand
- Owner: sno6
- License: mit
- Created: 2015-07-24T09:36:49.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-29T01:16:44.000Z (over 1 year ago)
- Last Synced: 2024-06-20T16:42:15.274Z (3 months ago)
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 162
- Watchers: 0
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gommand
Go one liner program similar to python -c
## How can I get it?```
go install github.com/sno6/gommand@latest
```## Examples
Write any Go code in a single line context, gommand will handle your imports and main function for you.```gommand 'fmt.Println("Hello gommand")'```
You could also quickly serve your current directory in one line.
```gommand 'http.Handle("/", http.FileServer(http.Dir("."))); fmt.Println(http.ListenAndServe(":8080", nil))'```Quickly find the date.
```gommand 'fmt.Println(time.Now())'```