clean up
This commit is contained in:
parent
30896fb50e
commit
63af7c7e8e
41
.gitignore
vendored
Normal file
41
.gitignore
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# ---> Go
|
||||||
|
# If you prefer the allow list template instead of the deny list, see community template:
|
||||||
|
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
||||||
|
#
|
||||||
|
# Binaries for programs and plugins
|
||||||
|
*.exe
|
||||||
|
*.exe~
|
||||||
|
*.dll
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
|
||||||
|
bin/
|
||||||
|
# Test binary, built with `go test -c`
|
||||||
|
*.test
|
||||||
|
tetris
|
||||||
|
ld
|
||||||
|
temp
|
||||||
|
|
||||||
|
# Log files
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||||
|
*.out
|
||||||
|
|
||||||
|
# Dependency directories (remove the comment below to include it)
|
||||||
|
# vendor/
|
||||||
|
|
||||||
|
# Go workspace file
|
||||||
|
go.work
|
||||||
|
|
||||||
|
# Datenbanken
|
||||||
|
*.db
|
||||||
|
*.db-shm
|
||||||
|
*.db-wal
|
||||||
|
*.mdb
|
||||||
|
*.mdw
|
||||||
|
|
||||||
|
# generated source code
|
||||||
|
static.go
|
||||||
|
|
||||||
|
rawdata
|
||||||
@ -32,12 +32,12 @@ func readCrew(server *server.Server) (string, error) {
|
|||||||
defer insstmt.Close()
|
defer insstmt.Close()
|
||||||
|
|
||||||
// Print the results
|
// Print the results
|
||||||
for i, text := range crewNames {
|
for _, text := range crewNames {
|
||||||
rank, name := splitRank(text)
|
rank, name := splitRank(text)
|
||||||
if rank == "" {
|
if rank == "" {
|
||||||
rank = "ERROR"
|
rank = "ERROR"
|
||||||
}
|
}
|
||||||
fmt.Printf("%d: rank: %s name: %s\n", i+1, rank, name)
|
// fmt.Printf("%d: rank: %s name: %s\n", i+1, rank, name)
|
||||||
_, err = insstmt.Exec(rank, name)
|
_, err = insstmt.Exec(rank, name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
@ -90,7 +90,7 @@ func readMessages(server *server.Server) error {
|
|||||||
defer insstmt.Close()
|
defer insstmt.Close()
|
||||||
// For demonstration, print the parsed messages
|
// For demonstration, print the parsed messages
|
||||||
for _, m := range messages {
|
for _, m := range messages {
|
||||||
fmt.Printf("[%s] %s (%s) - %s\n", m.Timestamp, m.Subsystem, m.Severity, m.Message)
|
// fmt.Printf("[%s] %s (%s) - %s\n", m.Timestamp, m.Subsystem, m.Severity, m.Message)
|
||||||
_, err = insstmt.Exec(m.Timestamp, m.Subsystem, m.Severity, m.Color, m.Message)
|
_, err = insstmt.Exec(m.Timestamp, m.Subsystem, m.Severity, m.Color, m.Message)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user