mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 12:45:47 +00:00
refactor: panic not print
This commit is contained in:
@@ -58,13 +58,11 @@ func Define_users(author_file string) {
|
|||||||
|
|
||||||
data, err := os.ReadFile(author_file)
|
data, err := os.ReadFile(author_file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error reading author file: ", err)
|
panic(fmt.Sprintf("Error reading author file: %v", err))
|
||||||
os.Exit(2)
|
|
||||||
}
|
}
|
||||||
err = json.Unmarshal(data, &auth)
|
err = json.Unmarshal(data, &auth)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error unmarshalling json: ", err)
|
panic(fmt.Sprintf("Error unmarshalling json: %v", err))
|
||||||
os.Exit(2)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Authors = auth
|
Authors = auth
|
||||||
|
|||||||
Reference in New Issue
Block a user