Debian Codegraph @

storage/2018-11-09/datalakestore/paths/helpers.go

raw
1 package paths
2
3 import (
4 "fmt"
5 )
6
7 func parsePathResource(input string) (PathResource, error) {
8 switch input {
9 case "file":
10 return PathResourceFile, nil
11 case "directory":
12 return PathResourceDirectory, nil
13 }
14 return "", fmt.Errorf("Unhandled path resource type %q", input)
15 }