File tree 1 file changed +13
-8
lines changed
1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -44,21 +44,26 @@ function save(instance::Instance, content::Dict)
44
44
end
45
45
46
46
function set! (instance:: Instance , key:: AbstractString , value:: Any )
47
- toml = load (instance)
48
- toml [key] = value
49
- save (instance, toml )
47
+ dict = load (instance)
48
+ dict [key] = value
49
+ save (instance, dict )
50
50
return nothing
51
51
end
52
52
53
53
function Base. get (instance:: Instance , key:: AbstractString )
54
- toml = load (instance)
55
- return toml[key]
54
+ dict = load (instance)
55
+ return dict[key]
56
+ end
57
+
58
+ function Base. get (instance:: Instance , key:: AbstractString , default:: Any )
59
+ dict = load (instance)
60
+ return get (dict, key, default)
56
61
end
57
62
58
63
function remove! (instance:: Instance , key:: AbstractString )
59
- toml = load (instance)
60
- delete! (toml , key)
61
- save (instance, toml )
64
+ dict = load (instance)
65
+ delete! (dict , key)
66
+ save (instance, dict )
62
67
return nothing
63
68
end
64
69
You can’t perform that action at this time.
0 commit comments