Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xta/okrun
ok, run your gofile
https://github.com/xta/okrun
Last synced: about 2 months ago
JSON representation
ok, run your gofile
- Host: GitHub
- URL: https://github.com/xta/okrun
- Owner: xta
- Created: 2014-10-01T06:18:56.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2014-10-06T01:15:31.000Z (over 9 years ago)
- Last Synced: 2024-01-31T05:55:28.413Z (5 months ago)
- Language: Go
- Homepage:
- Size: 153 KB
- Stars: 16
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Lists
- awesome-go - okrun - go run error steamroller. (Utilities / Utility/Miscellaneous)
- awesome-go - okrun - go run error steamroller. (Utilities / Utility/Miscellaneous)
- awesome-go-extra - okrun - 10-01T06:18:56Z|2014-10-06T01:15:31Z| (Utilities / Fail injection)
- awesome-go-cn - okrun
- awesome-go-zh - okrun
- awesome-go - okrun - go run error steamroller. (Utilities / Utility/Miscellaneous)
- fucking-awesome-go - :octocat: okrun - go run error steamroller. :star: 11 :fork_and_knife: 2 (Utilities / Advanced Console UIs)
- awesome-go - okrun - go run error steamroller. (Utilities / HTTP Clients)
- awesome-go-projects - okrun - go run error steamroller. (Utilities / HTTP Clients)
- awesome-go - okrun - | - | - | (Utilities / HTTP Clients)
- awesome-go - okrun - go run error steamroller. (Utilities / Advanced Console UIs)
- awesome-go-zh - okrun
- awesome-go-with-framework - okrun - go run error steamroller. (Utilities / HTTP Clients)
- awesome-go - okrun - go run error steamroller. (Utilities / Utility/Miscellaneous)
- awesome-go - okrun - go run error steamroller. (Utilities / Utility/Miscellaneous)
- awesome-go-stars - okrun - go run error steamroller. (Utilities / Utility/Miscellaneous)
- awesome-go-cn - okrun
- awesome-go - okrun - go run error steamroller (Utilities / Advanced Console UIs)
- awesome-go - okrun - go run error steamroller. (Utilities / HTTP Clients)
- awesome-go. - okrun - go run error steamroller. (Utilities / Advanced Console UIs)
- awesome-go - okrun - go run error steamroller. (Utilities / <span id="高级控制台用户界面-advanced-console-uis">高级控制台用户界面 Advanced Console UIs</span>)
- awesome-Char - okrun - go run error steamroller. (Utilities / HTTP Clients)
- awesome-go-cn - okrun - 当 Go 文件运行报错时尝试修复并运行 (实用工具 / 高级控制台界面)
- awesome-go-with-stars - okrun - go run error steamroller. (Utilities / Utility/Miscellaneous)
- awesome-go - okrun - go run error steamroller. (Utilities / HTTP Clients)
- repo-1316-awesome-go-cn - okrun
- repo-1211-awesome-go-cn - okrun
- awesome-reader - okrun - go run error steamroller. (Utilities / HTTP Clients)
- awesome-go - okrun - go run error steamroller. (Utilities / HTTP Clients)
- Go-awesome - okrun - go run error steamroller. (Utilities / Utility/Miscellaneous)
- awesome-go-cn - okrun
- awesome-go - okrun - go run error steamroller. (Utilities / Advanced Console UIs)
- awesome-go - okrun - go run error steamroller. (Utilities / Advanced Console UIs)
- go-awesome-cn-star - okrun
- awesome-go-cn - okrun
- awesome-go - okrun - 當 Go 文件運行報錯時嘗試修復並運行 (實用工具 / 高級控制台界面)
- awesome-go-handwritten - okrun - go run error steamroller. (Utilities / HTTP Clients)
- awesome-go - okrun - go run error steamroller. - :arrow_down:0 - :star:11 (Utilities / HTTP Clients)
- awesome-go2 - okrun - go run error steamroller. (Utilities / Advanced Console UIs)
- awesome-go - okrun - go run error steamroller. (Utilities / HTTP Clients)
- awesome-go - okrun - go run error steamroller. (Utilities / Utility/Miscellaneous)
- awesome-go - okrun - go run error steamroller. (Utilities / Advanced Console UIs)
- awesome-go - okrun - go run error steamroller. (Utilities / HTTP Clients)
- awesome-go-cn - okrun
- awesome-go - okrun - go run error steamroller. (Utilities / Utility/Miscellaneous)
- awesome-go - okrun - go run error steamroller. (Utilities / Utility/Miscellaneous)
- awesome-go - okrun - ok, run your gofile - ★ 13 (Utilities)
README
# OK Run (golang)
ok, run your gofile. run your gofile when `go run` would not.
[![GoDoc](https://godoc.org/github.com/xta/okrun?status.svg)](https://godoc.org/github.com/xta/okrun)
### Features
`okrun` will automatically fix the following error(s):* *imported and not used* - when your gofile contains an imported package that is not used, `okrun` will comment out the offending import line.
### Setup
// get okrun
go get github.com/xta/okrun// install okrun
cd $GOPATH && go install github.com/xta/okrun/### Usage
okrun path/to/your/file.goBy using `okrun`, your `file.go` will attempt to run when `go run` would otherwise refuse.
### Example
With file *example.go*:
package main
import (
"fmt"
"log"
)func main() {
fmt.Println("hi")
}`go run` will not run *example.go*:
go run example.go
# command-line-arguments
example.go:5: imported and not used: "log"`okrun` will run *example.go*:
okrun example.go
hi
`okrun` will update your gofile & properly format it. after running `okrun`, *example.go* is now:package main
import (
"fmt"
// "log"
)func main() {
fmt.Println("hi")
}## About
by [Rex Feng](https://twitter.com/rexfeng) 2014
## License
MIT