The number is the index of the last slash in the string. If you want to get the file’s base name, use filepath.Base
:
path := "/some/path/to/remove/file.name"
file := filepath.Base(path)
fmt.Println(file)
Playground: http://play.golang.org/p/DzlCV-HC-r.