Explicitly ignore errors from writes to responses
Some checks failed
/ docker (push) Failing after 15m26s
Some checks failed
/ docker (push) Failing after 15m26s
This commit is contained in:
parent
ef95a0552d
commit
4a2462e24e
30 changed files with 280 additions and 237 deletions
|
@ -48,7 +48,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer file.Close()
|
||||
defer func() { _ = file.Close() }()
|
||||
input = file
|
||||
}
|
||||
if *flagOutputFile == "" {
|
||||
|
@ -58,7 +58,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer file.Close()
|
||||
defer func() { _ = file.Close() }()
|
||||
output = file
|
||||
}
|
||||
|
||||
|
@ -204,5 +204,5 @@ func CompareRoles(a, b *models.Role) bool {
|
|||
outBuilder.WriteString("\n}")
|
||||
|
||||
// And write the entire thing to the output
|
||||
fmt.Fprint(output, outBuilder.String())
|
||||
_, _ = fmt.Fprint(output, outBuilder.String())
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer file.Close()
|
||||
defer func() { _ = file.Close() }()
|
||||
input = file
|
||||
}
|
||||
if *flagOutputFile == "" {
|
||||
|
@ -47,7 +47,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer file.Close()
|
||||
defer func() { _ = file.Close() }()
|
||||
output = file
|
||||
}
|
||||
|
||||
|
@ -100,5 +100,5 @@ func main() {
|
|||
}
|
||||
outBuilder.WriteString("}\n}\n")
|
||||
|
||||
fmt.Fprint(output, outBuilder.String())
|
||||
_, _ = fmt.Fprint(output, outBuilder.String())
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer file.Close()
|
||||
defer func() { _ = file.Close() }()
|
||||
input = file
|
||||
}
|
||||
if *flagOutputFile == "" {
|
||||
|
@ -48,7 +48,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer file.Close()
|
||||
defer func() { _ = file.Close() }()
|
||||
output = file
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ func main() {
|
|||
}
|
||||
|
||||
outBuilder.WriteString("}")
|
||||
fmt.Fprint(output, outBuilder.String())
|
||||
_, _ = fmt.Fprint(output, outBuilder.String())
|
||||
}
|
||||
|
||||
func convertGoNameToJsonApiName(name string) string {
|
||||
|
|
|
@ -39,7 +39,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer file.Close()
|
||||
defer func() { _ = file.Close() }()
|
||||
input = file
|
||||
}
|
||||
if *flagOutputFile == "" {
|
||||
|
@ -49,7 +49,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer file.Close()
|
||||
defer func() { _ = file.Close() }()
|
||||
output = file
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ func main() {
|
|||
role: Role
|
||||
}
|
||||
}`)
|
||||
fmt.Fprint(output, outBuilder.String())
|
||||
_, _ = fmt.Fprint(output, outBuilder.String())
|
||||
}
|
||||
|
||||
func convertGoTypeToTS(t string) string {
|
||||
|
|
|
@ -43,7 +43,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer file.Close()
|
||||
defer func() { _ = file.Close() }()
|
||||
input = file
|
||||
}
|
||||
if *flagOutputFile == "" {
|
||||
|
@ -53,7 +53,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer file.Close()
|
||||
defer func() { _ = file.Close() }()
|
||||
output = file
|
||||
}
|
||||
|
||||
|
@ -176,5 +176,5 @@ func main() {
|
|||
outBuilder.WriteString("\n}")
|
||||
|
||||
// And write the entire thing to the output
|
||||
fmt.Fprint(output, outBuilder.String())
|
||||
_, _ = fmt.Fprint(output, outBuilder.String())
|
||||
}
|
||||
|
|
|
@ -23,7 +23,10 @@ func main() {
|
|||
other.SetupFlags()
|
||||
flag.Parse()
|
||||
other.ConfigureLogging(nil)
|
||||
config.ReadAndWriteToGlobal(*shared.FlagConfigFile)
|
||||
err := config.ReadAndWriteToGlobal(*shared.FlagConfigFile)
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("Failed to get config from file")
|
||||
}
|
||||
|
||||
db, err := gorm.Open(
|
||||
postgres.Open(config.GlobalConfig.Storage.BuildPostgresDSN()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue