MCPcopy Index your code
hub / github.com/EngoEngine/engo / getExt

Function getExt

assets.go:76–84  ·  view source on GitHub ↗

getExt returns the extension of the file(including extensions with `.` in them) from the given url.

(path string)

Source from the content-addressed store, hash-verified

74
75// getExt returns the extension of the file(including extensions with `.` in them) from the given url.
76func getExt(path string) string {
77 ext := ""
78 for i := len(path) - 1; i >= 0 && !os.IsPathSeparator(path[i]); i-- {
79 if path[i] == '.' {
80 ext = path[i:]
81 }
82 }
83 return ext
84}
85
86// load loads the given resource into memory.
87func (formats *Formats) load(url string) error {

Callers 4

loadMethod · 0.70
LoadReaderDataMethod · 0.70
UnloadMethod · 0.70
ResourceMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected