Added result logging functionality (#2)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

All test commands now utilize the "-l" or "--log" flag to specify a file to log results to.

Reviewed-on: #2
This commit is contained in:
2022-02-26 20:48:37 -05:00
parent 7a8503ed3e
commit 90f679c366
5 changed files with 55 additions and 5 deletions

16
lib/io.go Normal file
View File

@@ -0,0 +1,16 @@
package lib
import (
"fmt"
"os"
)
func WriteToFile(filepath string, content string) {
file, err := os.Create(filepath)
if err != nil {
fmt.Println(err)
} else {
file.WriteString(content)
}
file.Close()
}