MCPcopy Create free account

hub / github.com/abramisola/go-coreutils / functions

Functions275 in github.com/abramisola/go-coreutils

↓ 16 callersMethodFormat
()
uptime/uptime.go:77
↓ 8 callersFunctioncolorizer
* If the file is a symbolic link, print it in cyan; a directory, blue; an executable file, * green; else print the file in white. */
ls/lswin.go:633
↓ 8 callersFunctioncolorizer
* If the file is a symbolic link, print it in cyan; a directory, blue; an executable file, * green; else print the file in white. */
ls/ls.go:564
↓ 6 callersFunctionbooleanToFloat
Return 1 if true, 0 if false.
expr/expr.go:155
↓ 6 callersFunctiongetPath
If there is no argument, set the directory path to the current working directory
ls/lswin.go:206
↓ 6 callersFunctiongetPath
If there is no argument, set the directory path to the current working directory
ls/ls.go:160
↓ 6 callersFunctionutsnameToString
utsnameToString converts the utsname to a string and returns it.
uname/uname.go:99
↓ 5 callersFunctiontry_move
(originalLocation, newLocation string)
mv/mv.go:132
↓ 4 callersFunctionbufferFile
bufferFile returns a byte slice of the file contents.
head/head.go:66
↓ 4 callersFunctionbufferFile
bufferFile returns a byte slice of the file contents.
tail/tail.go:66
↓ 4 callersFunctionfileExists
The fileExists function will check if the file exists.
mv/mv.go:57
↓ 4 callersFunctionprintError
Prints an error indicating that the syntax is wrong and exits.
expr/expr.go:85
↓ 3 callersFunctionerrorChecker
Displays error messages
ls/lswin.go:198
↓ 3 callersFunctionerrorChecker
Displays error messages
ls/ls.go:152
↓ 3 callersFunctiongetBaseName
Obtain the basename.
basename/basename.go:109
↓ 3 callersFunctionprintAndExit
printAndExit prints a message and exits the program.
rmdir/rmdir.go:44
↓ 3 callersFunctionprintAndExit
printAndExit will print a message and then exit the program.
wc/wc.go:77
↓ 3 callersFunctionprintHeadingBytes
printHeadingBytes prints the first N bytes from the input buffer.
head/head.go:117
↓ 3 callersFunctionprintHeadingLines
printHeadingLines prints the first N lines from the input buffer.
head/head.go:105
↓ 3 callersFunctionprintTailingBytes
printTailingBytes prints the last N bytes from the input buffer.
tail/tail.go:123
↓ 3 callersFunctionprintTailingLines
printTailingLines prints the last N lines from the input buffer.
tail/tail.go:111
↓ 3 callersFunctiontimespecToTime
Convert timespec to time
stat/stat.go:164
↓ 2 callersMethodRun
Kahn's algorithm O(|V|+|E|)
tsort/tsort.go:97
↓ 2 callersFunctionbufferToStringArray
Converts a bytes buffer into a newline-separated string array.
ls/lswin.go:284
↓ 2 callersFunctionbufferToStringArray
Converts a bytes buffer into a newline-separated string array.
stat/stat.go:107
↓ 2 callersFunctioncalculateInitialResult
The initial result in an expression needs to be calculated differently than the rest.
expr/expr.go:164
↓ 2 callersFunctioncalculateModulus
Checks if the numbers can be modulated, and if so returns the modulated value.
expr/expr.go:140
↓ 2 callersFunctioncheckIDLength
If the length of the ID is greater than the max ID length, length becomes the new max ID length.
ls/lswin.go:442
↓ 2 callersFunctioncheckIDLength
If the length of the ID is greater than the max ID length, length becomes the new max ID length.
ls/ls.go:373
↓ 2 callersFunctionfloatIsInteger
Checks if the number can be an integer for calculating the modulus.
expr/expr.go:130
↓ 2 callersFunctiongetDirName
Return the dirname
dirname/dirname.go:63
↓ 2 callersFunctiongetFactorList
* getFactorList generates a factorList type containing all of the prime factors * of the 'number' input. The prime seive used will first check if the
factor/factor.go:60
↓ 2 callersFunctiongetGID
Returns group id
ls/lswin.go:301
↓ 2 callersFunctiongetGID
Returns group id
ls/ls.go:234
↓ 2 callersFunctiongetType
Obtain the file mode type
stat/stat.go:147
↓ 2 callersFunctiongetUID
Returns user id
ls/lswin.go:294
↓ 2 callersFunctiongetUID
Returns user id
ls/ls.go:229
↓ 2 callersMethodhasNode
(n V)
tsort/tsort.go:73
↓ 2 callersMethodinitNode
(n V)
tsort/tsort.go:69
↓ 2 callersFunctioninput
The input function prints a statement to the user and accepts an input, then returns the input.
mv/mv.go:46
↓ 2 callersFunctionmover
* The mover function will take two strings as an argument and move the original file/dir to * a new location. */
mv/mv.go:97
↓ 2 callersFunctionopenFile
Opens a file and returns it
ls/lswin.go:258
↓ 2 callersFunctionparseLine
Returns a colon separated string array for use in parsing /etc/group and /etc/user
ls/lswin.go:289
↓ 2 callersFunctionparseLine
Returns a colon separated string array for use in parsing /etc/group and /etc/user
ls/ls.go:224
↓ 2 callersFunctionparseLine
Returns a colon separated string array for use in parsing /etc/group and /etc/user
stat/stat.go:112
↓ 2 callersFunctionprintDate
printDate prints the time based on the layout format.
date/date.go:97
↓ 2 callersFunctionprintLongModeFile
Prints a single file in long mode format.
ls/lswin.go:668
↓ 2 callersFunctionprintLongModeFile
Prints a single file in long mode format.
ls/ls.go:599
↓ 2 callersMethodprintStats
printStats prints the statistics for the current file.
wc/wc.go:181
↓ 2 callersFunctionprintTopToBottomFile
Prints a file on the screen and determines when it is time to print a newline.
ls/lswin.go:720
↓ 2 callersFunctionprintTopToBottomFile
Prints a file on the screen and determines when it is time to print a newline.
ls/ls.go:651
↓ 2 callersFunctionreadLink
Resolve the symbolic link
stat/stat.go:169
↓ 2 callersMethodscanFile
scanFile scans each file, line by line, gathering statistics using a scanner.
wc/wc.go:203
↓ 2 callersFunctionsilentCheck
silentCheck prints the file name if silent mode is enabled.
head/head.go:76
↓ 2 callersFunctionsilentCheck
silentCheck prints the file name if silent mode is enabled.
tail/tail.go:76
↓ 2 callersFunctionsuffixExists
Check if the last argument is a suffix
basename/basename.go:128
↓ 2 callersMethodtoString
toString returns the factorList as a string.
factor/factor.go:44
↓ 2 callersFunctionunsetenv
(name string)
env/env.go:62
↓ 2 callersFunctionwordCount
wordcount returns the number of words by splitting the buffer's fields.
wc/wc.go:122
↓ 1 callersMethodGet
()
uptime/uptime.go:50
↓ 1 callersMethodGet
()
uptime/uptime.go:65
↓ 1 callersFunctionGetCurrentUser
(username *string)
logname/logname.go:33
↓ 1 callersFunctionNewGraph
()
tsort/tsort.go:62
↓ 1 callersFunctionNewNode
()
tsort/tsort.go:50
↓ 1 callersFunctionRemoveAll
MODIFIED FROM THE os.RemoveAll() implimentation RemoveAll removes all files/directories below and prompts if the option is set.
rm/rm.go:50
↓ 1 callersMethodaddEdge
(from V, to V)
tsort/tsort.go:78
↓ 1 callersFunctionargumentCheck
* If the number of arguments given is zero, print the help text. * Otherwise check if the zero flag is set and print the dirname * of each file. */
dirname/dirname.go:70
↓ 1 callersFunctionargumentCheck
A switch to check arguments and process them accordingly.
basename/basename.go:93
↓ 1 callersFunctionargumentCheck
* The argumentCheck function will check the number of arguments given to the program and process them * accordingly. */
mv/mv.go:68
↓ 1 callersFunctionargumentIsDir
argumentIsDir returns true if the argument is a directory.
rmdir/rmdir.go:50
↓ 1 callersFunctionargumentLoop
Loops through each argument given.
stat/stat.go:214
↓ 1 callersFunctionbufferCPUInfo
bufferCPUInfo returns a newline-delimited string slice of '/proc/cpuinfo'.
uname/uname.go:119
↓ 1 callersFunctionbufferGroups
Opens the group file and returns a buffer of it's contents.
ls/lswin.go:276
↓ 1 callersFunctionbufferGroups
Get a list of groups from getent
ls/ls.go:218
↓ 1 callersFunctionbufferGroups
Opens the group file and returns a buffer of it's contents.
stat/stat.go:93
↓ 1 callersFunctionbufferUsers
Opens the passwd file and returns a buffer of it's contents.
ls/lswin.go:268
↓ 1 callersFunctionbufferUsers
Get a list of users from getent
ls/ls.go:212
↓ 1 callersFunctionbufferUsers
Opens the passwd file and returns a buffer of it's contents.
stat/stat.go:80
↓ 1 callersFunctioncalculateArithmetic
Performs arithmetic calculations
expr/expr.go:271
↓ 1 callersFunctioncalculateExpressionRanges
Calculate the range of numbers to calculate between expressions.
expr/expr.go:184
↓ 1 callersFunctioncalculateExpressions
Calculate each result between inequality expressions
expr/expr.go:207
↓ 1 callersFunctioncalculateInequalities
Returns 1 for true, 0 for false, or any
expr/expr.go:244
↓ 1 callersFunctioncharacterCount
* characterCount counts the number of characters in the bytes buffer by * sending a bytes slice of the buffer to the RuneCount function in utf8. This
wc/wc.go:129
↓ 1 callersFunctioncheckForHiddenFiles
Loop through each file in the directory and check whether or not it is hidden. If the file is hidden, it shall not be displayed.
ls/lswin.go:231
↓ 1 callersFunctioncheckForHiddenFiles
Loop through each file in the directory and check whether or not it is hidden. If the file is hidden, it shall not be displayed.
ls/ls.go:185
↓ 1 callersFunctioncheckIfNoArgumentsAreGiven
Print an error and exit the program if there are no arguments.
expr/expr.go:91
↓ 1 callersFunctioncheckIfSymlink
If the file is a symbolic link, resolve it and print the mode type of that location.
ls/lswin.go:654
↓ 1 callersFunctioncheckIfSymlink
If the file is a symbolic link, resolve it and print the mode type of that location.
ls/ls.go:585
↓ 1 callersFunctioncheckSuffix
Checks if a suffix is set and prints the basename accordingly.
basename/basename.go:114
↓ 1 callersFunctioncheckZero
Used in multiFilePrinter for checking if zeroMode is enabled.
basename/basename.go:137
↓ 1 callersFunctioncountMaxIDLength
Determines the max ID length.
ls/lswin.go:449
↓ 1 callersFunctioncountMaxIDLength
Determines the max ID length.
ls/ls.go:380
↓ 1 callersFunctioncountMaxSizeLength
Determines the max character length of file size and user/group names/ids.
ls/lswin.go:431
↓ 1 callersFunctioncountMaxSizeLength
Determines the max character length of file size and user/group names/ids.
ls/ls.go:362
↓ 1 callersFunctioncountRows
Returns the number of rows to print
ls/lswin.go:500
↓ 1 callersFunctioncountRows
Returns the number of rows to print
ls/ls.go:431
↓ 1 callersFunctioncountTotalCharLength
Counts char length up to maximum terminal width
ls/lswin.go:458
↓ 1 callersFunctioncountTotalCharLength
Counts char length up to maximum terminal width
ls/ls.go:389
↓ 1 callersFunctiondateFormatCheck
Checks if the date of the file is from a prior year, and if so print the year, else print only the hour and minute.
ls/lswin.go:309
↓ 1 callersFunctiondateFormatCheck
Checks if the date of the file is from a prior year, and if so print the year, else print only the hour and minute.
ls/ls.go:322
next →1–100 of 275, ranked by callers