nameOfLast returns the name of the last component
(path string)
| 1984 | |
| 1985 | // nameOfLast returns the name of the last component |
| 1986 | func nameOfLast(path string) string { |
| 1987 | for i := len(path) - 1; i >= 0; i-- { |
| 1988 | if path[i] == '|' || path[i] == '.' { |
| 1989 | if i > 0 { |
| 1990 | if path[i-1] == '\\' { |
| 1991 | continue |
| 1992 | } |
| 1993 | } |
| 1994 | return path[i+1:] |
| 1995 | } |
| 1996 | } |
| 1997 | return path |
| 1998 | } |
| 1999 | |
| 2000 | func isSimpleName(component string) bool { |
| 2001 | for i := 0; i < len(component); i++ { |
no outgoing calls
no test coverage detected
searching dependent graphs…