MCPcopy Create free account
hub / github.com/chanify/chanify / fileBaseName

Function fileBaseName

core/utils.go:149–158  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

147}
148
149func fileBaseName(path string) string {
150 name := ""
151 if len(path) > 0 {
152 _, fname := filepath.Split(path)
153 if len(fname) > 0 && fname[0] != '.' {
154 name = fname
155 }
156 }
157 return name
158}
159
160func fixLog(s string) string {
161 return strings.Replace(strings.Replace(s, "\n", "", -1), "\r", "", -1)

Callers 3

ParseFormDataMethod · 0.85
TestFileBaseNameFunction · 0.85
handlePostSenderMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestFileBaseNameFunction · 0.68