Skip to content

Commit 62f721a

Browse files
committed
Initial checkin.
0 parents  commit 62f721a

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

main.go

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package main
2+
3+
import (
4+
"os"
5+
6+
"fmt"
7+
"strings"
8+
9+
"ac-get.darkdna.net/checker"
10+
)
11+
12+
type res struct {
13+
indent int
14+
}
15+
16+
func (_ res) BeginCheck() {
17+
// Do Nothing.
18+
}
19+
20+
func (_ res) EndCheck() {
21+
// Do Nothing.
22+
}
23+
24+
func (r res) Done() {
25+
// Do nothing.
26+
}
27+
28+
func (r res) BeginTest(format string, args ...interface{}) checker.Results {
29+
fmt.Printf("%sBeginning: %s\n", strings.Repeat(" ", r.indent), fmt.Sprintf(format, args...))
30+
return res{r.indent + 1}
31+
}
32+
33+
func (r res) Fail(format string, args ...interface{}) {
34+
fmt.Printf("%sFailed: %s\n", strings.Repeat(" ", r.indent), fmt.Sprintf(format, args...))
35+
}
36+
37+
func (r res) Success() {
38+
fmt.Printf("%sSucceeded.\n", strings.Repeat(" ", r.indent))
39+
}
40+
41+
func (r res) Warn(format string, args ...interface{}) {
42+
fmt.Printf("%sWarning: %s\n", strings.Repeat(" ", r.indent), fmt.Sprintf(format, args...))
43+
}
44+
45+
func main() {
46+
if len(os.Args) < 2 {
47+
fmt.Printf("Usage: acg-checkup <repo-url>\n")
48+
49+
return
50+
}
51+
52+
r := res{0}
53+
54+
checker.Run(os.Args[1], r)
55+
}

0 commit comments

Comments
 (0)