added support for dotenv files and config
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import "core:fmt"
|
||||
import "core:strings"
|
||||
ErrorType :: enum {
|
||||
Config,
|
||||
API,
|
||||
}
|
||||
|
||||
Error :: struct {
|
||||
type: ErrorType,
|
||||
message: string,
|
||||
}
|
||||
|
||||
format_error :: proc(err: ^Error) -> string {
|
||||
sb := strings.builder_make(context.temp_allocator)
|
||||
|
||||
return fmt.sbprintf(&sb, "[%s] => %s", err.type, err.message)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user