Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: client/internal/common/json.go

Issue 2933273002: Remove ReadJSONFile (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/cmd/isolate/batch_archive.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/internal/common/json.go
diff --git a/client/internal/common/json.go b/client/internal/common/json.go
index 80b20d9d79696fe08dde47db4dd0d3b88f01ff2c..d1b6c1ac424b99e7fdce3b11d9b2f911b1900e5b 100644
--- a/client/internal/common/json.go
+++ b/client/internal/common/json.go
@@ -10,19 +10,6 @@ import (
"os"
)
-// ReadJSONFile reads a file and decode it as JSON.
-func ReadJSONFile(filePath string, object interface{}) error {
- f, err := os.Open(filePath)
- if err != nil {
- return fmt.Errorf("failed to open %s: %s", filePath, err)
- }
- defer f.Close()
- if err = json.NewDecoder(f).Decode(object); err != nil {
- return fmt.Errorf("failed to decode %s: %s", filePath, err)
- }
- return nil
-}
-
// WriteJSONFile writes object as json encoded into filePath with 2 spaces
// indentation. File permission is set to user only.
func WriteJSONFile(filePath string, object interface{}) error {
« no previous file with comments | « client/cmd/isolate/batch_archive.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698