ソースを参照

move doc comments to the top.

Lucas Stadler 11 年 前
コミット
015ac868a6
共有2 個のファイルを変更した6 個の追加16 個の削除を含む
  1. 1 4
      go/detect/detect.go
  2. 5 12
      go/qst.go

+ 1 - 4
go/detect/detect.go

1
// Guess project "type" from the files present.
1
package detect
2
package detect
2
3
3
import (
4
import (
7
	"../fileutil"
8
	"../fileutil"
8
)
9
)
9
10
10
/*
11
	detect - guess the project type from files present
12
*/
13
14
type Project struct {
11
type Project struct {
15
	Id       string
12
	Id       string
16
	Commands Commands
13
	Commands Commands

+ 5 - 12
go/qst.go

1
// qst - run things quickly
2
//
3
// Given a file or directory, guesses the project type and runs
4
// it for you. Restarts on changes. Intended for small experiments
5
// and working with unfamilar build systems.
1
package main
6
package main
2
7
3
import (
8
import (
17
	"./fileutil"
22
	"./fileutil"
18
)
23
)
19
24
20
/*
21
22
# the plan
23
24
qst: run things quickly
25
26
qst - detects the current project type and runs it
27
qst hello.rb - runs `ruby hello.rb`
28
qst hello.go - compiles & runs hello.go
29
30
*/
31
32
var delay = flag.Duration("delay", 1*time.Second, "time to wait until restart")
25
var delay = flag.Duration("delay", 1*time.Second, "time to wait until restart")
33
var autoRestart = flag.Bool("autorestart", true, "automatically restart after command exists")
26
var autoRestart = flag.Bool("autorestart", true, "automatically restart after command exists")
34
var command = flag.String("command", "", "command to run ({file} will be substituted)")
27
var command = flag.String("command", "", "command to run ({file} will be substituted)")