commit f87626ea8cff2bfb709877289e73e87c09d956ee
parent 912752f46b6075653e1e356845eee1aeeb5e52df
Author: gearsix <gearsix@tuta.io>
Date: Fri, 3 Feb 2023 15:45:46 +0000
renamed LoadDataFilepath -> LoadDataFile (depreciated LoadDataFilepath)
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/data.go b/data.go
@@ -77,7 +77,7 @@ func LoadData(lang string, in io.Reader, outp interface{}) error {
// LoadDataFile loads all the data from the file found at `path` into the the
// format of that files extension (e.g. "x.json" will be loaded as a json).
// The result is written to the value pointed at by `outp`.
-func LoadDataFilepath(path string, outp interface{}) error {
+func LoadDataFile(path string, outp interface{}) error {
f, e := os.Open(path)
defer f.Close()
@@ -90,3 +90,8 @@ func LoadDataFilepath(path string, outp interface{}) error {
return e
}
+
+// **DEPRECIATED** please use LoadDataFile
+func LoadDataFilepath(path string, outp interface{}) error {
+ return LoadDataFile(path, outp)
+}