Skip to content

Commit 5e909b5

Browse files
committed
Correct format of code style.
Signed-off-by: linzhinan(zen Lin) <[email protected]>
1 parent 37b9346 commit 5e909b5

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

config/config.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,11 @@ func init() {
2727

2828
rd := bufio.NewReader(f)
2929
count := 0
30-
3130
for {
32-
3331
line, err := rd.ReadString('\n')
3432
if err != nil || io.EOF == err {
3533
break
3634
}
37-
3835
prefix := strings.Split(line, "=")
3936
caseName := strings.TrimSpace(prefix[0])
4037
caseArg := strings.TrimPrefix(line, caseName+"=")
@@ -47,7 +44,6 @@ func init() {
4744
}
4845

4946
func splitArgs(args string) []string {
50-
5147
argArray := strings.Split(args, ";")
5248
resArray := make([]string, len(argArray))
5349
for count, arg := range argArray {

runtimetest.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const bundleCacheDir = "./bundles"
1313
var runtimetestFlags = []cli.Flag{
1414
cli.StringFlag{Name: "runtime, r", Usage: "runtime to be tested"},
1515
cli.StringFlag{Name: "output, o", Usage: "output format, \n" +
16-
"-o=all: ouput sucessful details and statics, -o=err-only: ouput failure details and statics"},
16+
"-o=all: ouput sucessful details and statistics, -o=err-only: ouput failure details and statics"},
1717
cli.BoolFlag{Name: "debug, d", Usage: "switch of debug mode, defaults to false, with '--debug' to enable debug mode"},
1818
}
1919

@@ -22,13 +22,12 @@ var runtimeTestCommand = cli.Command{
2222
Usage: "test if a runtime is comlpliant to oci specs",
2323
Flags: runtimetestFlags,
2424
Action: func(context *cli.Context) {
25-
2625
if os.Geteuid() != 0 {
2726
logrus.Fatalln("runtimetest should be run as root")
2827
}
2928
var runtime string
3029
if runtime = context.String("runtime"); runtime != "runc" {
31-
logrus.Fatalf("runtimetest have not support %v\n", runtime)
30+
logrus.Fatalf("runtimetest does not support %v\n", runtime)
3231
}
3332
output := context.String("output")
3433
setDebugMode(context.Bool("debug"))
@@ -57,7 +56,6 @@ var runtimeTestCommand = cli.Command{
5756
if err := os.Remove("./config.json"); err != nil {
5857
logrus.Fatalf("remove ./config.json err: %v\n", err)
5958
}
60-
6159
},
6260
}
6361

units/unit.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,11 @@ func runcStart(specDir string) (string, error) {
276276
if err != nil {
277277
return string(out), errors.New(string(out) + err.Error())
278278
}
279-
280279
return string(out), nil
281280
}
282281

283282
func splitArgs(args string) []string {
284-
285283
argsnew := strings.TrimSpace(args)
286-
287284
argArray := strings.Split(argsnew, "--")
288285

289286
length := len(argArray)

0 commit comments

Comments
 (0)