mirror of
https://github.com/sbrow/envr.git
synced 2026-06-27 10:38:33 -04:00
fix: Fixed vet errors.
This commit is contained in:
5
cli.odin
5
cli.odin
@@ -103,9 +103,10 @@ parse_args :: proc(args: []string, out: io.Stream, err: io.Stream) -> (cmd: Comm
|
||||
}
|
||||
}
|
||||
|
||||
if val, ok := cmd.flags["config-file"]; ok {
|
||||
val: string = ---
|
||||
if val, ok = cmd.flags["config-file"]; ok {
|
||||
cmd.config_path = val
|
||||
} else if val, ok := cmd.flags["c"]; ok {
|
||||
} else if val, ok = cmd.flags["c"]; ok {
|
||||
cmd.config_path = val
|
||||
} else {
|
||||
// FIXME: Handle err
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#+feature dynamic-literals
|
||||
#+test
|
||||
package main
|
||||
|
||||
import "core:bufio"
|
||||
import "core:fmt"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#+test
|
||||
package main
|
||||
|
||||
import "core:fmt"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#+test
|
||||
package main
|
||||
|
||||
import "core:path/filepath"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#+test
|
||||
package main
|
||||
|
||||
import "core:fmt"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#+test
|
||||
package main
|
||||
|
||||
import "core:fmt"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#+test
|
||||
package main
|
||||
|
||||
import "core:fmt"
|
||||
|
||||
4
db.odin
4
db.odin
@@ -535,8 +535,8 @@ shares_remote :: proc(f: ^EnvFile, remotes: []string) -> bool {
|
||||
get_git_remotes :: proc(dir: string, allocator: mem.Allocator) -> [dynamic]string {
|
||||
config_path, _ := filepath.join({dir, ".git", "config"}, context.temp_allocator)
|
||||
// TODO: Handle error
|
||||
m, _, ok := ini.load_map_from_path(config_path, context.temp_allocator)
|
||||
if !ok {
|
||||
m, _, read_ok := ini.load_map_from_path(config_path, context.temp_allocator)
|
||||
if !read_ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#+test
|
||||
package main
|
||||
|
||||
import "core:fmt"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#+test
|
||||
package main
|
||||
|
||||
import "core:crypto/hash"
|
||||
@@ -513,7 +514,8 @@ test_db_sync_dir_missing :: proc(t: ^testing.T) {
|
||||
db_insert(&d, f)
|
||||
|
||||
result, err := db_sync(&d, &f)
|
||||
testing.expect(t, err == .DirMissing, "should return DirMissing error")
|
||||
testing.expect_value(t, err, SyncError.DirMissing)
|
||||
testing.expect_value(t, result, nil)
|
||||
}
|
||||
|
||||
@(test)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#+test
|
||||
package main
|
||||
|
||||
import "core:fmt"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#+test
|
||||
package main
|
||||
|
||||
import "core:fmt"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#+test
|
||||
package main
|
||||
|
||||
import "core:encoding/json"
|
||||
|
||||
Reference in New Issue
Block a user