File: helpers.go

package info (click to toggle)
golang-github-tombuildsstuff-giovanni 0.20.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 15,908 kB
  • sloc: makefile: 3
file content (15 lines) | stat: -rw-r--r-- 281 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package paths

import (
	"fmt"
)

func parsePathResource(input string) (PathResource, error) {
	switch input {
	case "file":
		return PathResourceFile, nil
	case "directory":
		return PathResourceDirectory, nil
	}
	return "", fmt.Errorf("Unhandled path resource type %q", input)
}