diff --git a/file.go b/file.go index f9366fa..e59d62f 100644 --- a/file.go +++ b/file.go @@ -153,14 +153,8 @@ func (f *file) ReadAnyFileContent(filePath string, receiver any) error { var ( parseFunc func(filePath string, receiver any) error ) - filePathArr := strings.Split(filePath, "#@#") - fileExt := "" - filePath = filePathArr[0] - if len(filePathArr) == 2 && len(filePathArr[1]) > 0 { - fileExt = strings.ToLower(filePathArr[1]) - } else { - fileExt = strings.ToLower(path.Ext(filePath)) - } + + fileExt := strings.TrimLeft(strings.ToLower(path.Ext(filePath)), ".") switch fileExt { case consts.FileTypeJson: parseFunc = f.ReadJSONContent