Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/crawshaw/jsonfile
/ functions
Functions
11 in github.com/crawshaw/jsonfile
⨍
Functions
11
◇
Types & classes
3
↓ 6 callers
Method
Read
Read calls fn with the current copy of the data.
jsonfile.go:64
↓ 6 callers
Function
mustWrite
(t *testing.T, data *JSONFile[Data], fn func(db *Data))
jsonfile_test.go:16
↓ 4 callers
Method
Write
Write calls fn with a copy of the data, then writes the changes to the file. If fn returns an error, Write does not change the file and returns the er
jsonfile.go:72
Function
Load
Load loads an existing JSONFileData from the given path. If the file does not exist, Load returns an error that can be checked with os.IsNotExist. L
jsonfile.go:50
Function
New
New creates a new empty JSONFile at the given path.
jsonfile.go:28
Function
TestBadLoad
(t *testing.T)
jsonfile_test.go:155
Function
TestBadNew
(t *testing.T)
jsonfile_test.go:174
Function
TestBasic
(t *testing.T)
jsonfile_test.go:23
Function
TestFileError
(t *testing.T)
jsonfile_test.go:97
Function
TestNoAlias
(t *testing.T)
jsonfile_test.go:131
Function
TestRollbackOnProgramError
(t *testing.T)
jsonfile_test.go:69