v 1.0.0 - Added functionnal testing - Needs Travis integration

This commit is contained in:
Brendan LE GLAUNEC
2016-06-21 10:53:24 +02:00
parent 08231074b9
commit 1f5e9fc502
24 changed files with 1138 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
package main
import (
"encoding/json"
"fmt"
"os"
)
// Launch it via goroutine
// Start read log of service
func getResult(test *[]Result, resultPath string) bool {
// Load config
resultFile, err := os.Open(resultPath)
if err != nil {
fmt.Printf("\nCan't open result file: %s\n", err)
return false
}
dec := json.NewDecoder(resultFile)
if err = dec.Decode(&test); err != nil {
fmt.Printf("\nUnable to deserialize result file: %s\n", err)
return false
}
return true
}