@@ -158,3 +158,8 @@ func StructToMap(in interface{}, tag string) (map[string]interface{}, error) {
}
return out, nil
+func FileNameFromPath(input string) string {
+ result := strings.ReplaceAll(input, "\\", "/")
+ parts := strings.Split(result, "/")
+ return parts[len(parts)-1]
+}