Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/abramisola/go-coreutils
/ functions
Functions
275 in github.com/abramisola/go-coreutils
⨍
Functions
275
◇
Types & classes
13
↓ 16 callers
Method
Format
()
uptime/uptime.go:77
↓ 8 callers
Function
colorizer
* 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 callers
Function
colorizer
* 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 callers
Function
booleanToFloat
Return 1 if true, 0 if false.
expr/expr.go:155
↓ 6 callers
Function
getPath
If there is no argument, set the directory path to the current working directory
ls/lswin.go:206
↓ 6 callers
Function
getPath
If there is no argument, set the directory path to the current working directory
ls/ls.go:160
↓ 6 callers
Function
utsnameToString
utsnameToString converts the utsname to a string and returns it.
uname/uname.go:99
↓ 5 callers
Function
try_move
(originalLocation, newLocation string)
mv/mv.go:132
↓ 4 callers
Function
bufferFile
bufferFile returns a byte slice of the file contents.
head/head.go:66
↓ 4 callers
Function
bufferFile
bufferFile returns a byte slice of the file contents.
tail/tail.go:66
↓ 4 callers
Function
fileExists
The fileExists function will check if the file exists.
mv/mv.go:57
↓ 4 callers
Function
printError
Prints an error indicating that the syntax is wrong and exits.
expr/expr.go:85
↓ 3 callers
Function
errorChecker
Displays error messages
ls/lswin.go:198
↓ 3 callers
Function
errorChecker
Displays error messages
ls/ls.go:152
↓ 3 callers
Function
getBaseName
Obtain the basename.
basename/basename.go:109
↓ 3 callers
Function
printAndExit
printAndExit prints a message and exits the program.
rmdir/rmdir.go:44
↓ 3 callers
Function
printAndExit
printAndExit will print a message and then exit the program.
wc/wc.go:77
↓ 3 callers
Function
printHeadingBytes
printHeadingBytes prints the first N bytes from the input buffer.
head/head.go:117
↓ 3 callers
Function
printHeadingLines
printHeadingLines prints the first N lines from the input buffer.
head/head.go:105
↓ 3 callers
Function
printTailingBytes
printTailingBytes prints the last N bytes from the input buffer.
tail/tail.go:123
↓ 3 callers
Function
printTailingLines
printTailingLines prints the last N lines from the input buffer.
tail/tail.go:111
↓ 3 callers
Function
timespecToTime
Convert timespec to time
stat/stat.go:164
↓ 2 callers
Method
Run
Kahn's algorithm O(|V|+|E|)
tsort/tsort.go:97
↓ 2 callers
Function
bufferToStringArray
Converts a bytes buffer into a newline-separated string array.
ls/lswin.go:284
↓ 2 callers
Function
bufferToStringArray
Converts a bytes buffer into a newline-separated string array.
stat/stat.go:107
↓ 2 callers
Function
calculateInitialResult
The initial result in an expression needs to be calculated differently than the rest.
expr/expr.go:164
↓ 2 callers
Function
calculateModulus
Checks if the numbers can be modulated, and if so returns the modulated value.
expr/expr.go:140
↓ 2 callers
Function
checkIDLength
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 callers
Function
checkIDLength
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 callers
Function
floatIsInteger
Checks if the number can be an integer for calculating the modulus.
expr/expr.go:130
↓ 2 callers
Function
getDirName
Return the dirname
dirname/dirname.go:63
↓ 2 callers
Function
getFactorList
* 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 callers
Function
getGID
Returns group id
ls/lswin.go:301
↓ 2 callers
Function
getGID
Returns group id
ls/ls.go:234
↓ 2 callers
Function
getType
Obtain the file mode type
stat/stat.go:147
↓ 2 callers
Function
getUID
Returns user id
ls/lswin.go:294
↓ 2 callers
Function
getUID
Returns user id
ls/ls.go:229
↓ 2 callers
Method
hasNode
(n V)
tsort/tsort.go:73
↓ 2 callers
Method
initNode
(n V)
tsort/tsort.go:69
↓ 2 callers
Function
input
The input function prints a statement to the user and accepts an input, then returns the input.
mv/mv.go:46
↓ 2 callers
Function
mover
* 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 callers
Function
openFile
Opens a file and returns it
ls/lswin.go:258
↓ 2 callers
Function
parseLine
Returns a colon separated string array for use in parsing /etc/group and /etc/user
ls/lswin.go:289
↓ 2 callers
Function
parseLine
Returns a colon separated string array for use in parsing /etc/group and /etc/user
ls/ls.go:224
↓ 2 callers
Function
parseLine
Returns a colon separated string array for use in parsing /etc/group and /etc/user
stat/stat.go:112
↓ 2 callers
Function
printDate
printDate prints the time based on the layout format.
date/date.go:97
↓ 2 callers
Function
printLongModeFile
Prints a single file in long mode format.
ls/lswin.go:668
↓ 2 callers
Function
printLongModeFile
Prints a single file in long mode format.
ls/ls.go:599
↓ 2 callers
Method
printStats
printStats prints the statistics for the current file.
wc/wc.go:181
↓ 2 callers
Function
printTopToBottomFile
Prints a file on the screen and determines when it is time to print a newline.
ls/lswin.go:720
↓ 2 callers
Function
printTopToBottomFile
Prints a file on the screen and determines when it is time to print a newline.
ls/ls.go:651
↓ 2 callers
Function
readLink
Resolve the symbolic link
stat/stat.go:169
↓ 2 callers
Method
scanFile
scanFile scans each file, line by line, gathering statistics using a scanner.
wc/wc.go:203
↓ 2 callers
Function
silentCheck
silentCheck prints the file name if silent mode is enabled.
head/head.go:76
↓ 2 callers
Function
silentCheck
silentCheck prints the file name if silent mode is enabled.
tail/tail.go:76
↓ 2 callers
Function
suffixExists
Check if the last argument is a suffix
basename/basename.go:128
↓ 2 callers
Method
toString
toString returns the factorList as a string.
factor/factor.go:44
↓ 2 callers
Function
unsetenv
(name string)
env/env.go:62
↓ 2 callers
Function
wordCount
wordcount returns the number of words by splitting the buffer's fields.
wc/wc.go:122
↓ 1 callers
Method
Get
()
uptime/uptime.go:50
↓ 1 callers
Method
Get
()
uptime/uptime.go:65
↓ 1 callers
Function
GetCurrentUser
(username *string)
logname/logname.go:33
↓ 1 callers
Function
NewGraph
()
tsort/tsort.go:62
↓ 1 callers
Function
NewNode
()
tsort/tsort.go:50
↓ 1 callers
Function
RemoveAll
MODIFIED FROM THE os.RemoveAll() implimentation RemoveAll removes all files/directories below and prompts if the option is set.
rm/rm.go:50
↓ 1 callers
Method
addEdge
(from V, to V)
tsort/tsort.go:78
↓ 1 callers
Function
argumentCheck
* 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 callers
Function
argumentCheck
A switch to check arguments and process them accordingly.
basename/basename.go:93
↓ 1 callers
Function
argumentCheck
* The argumentCheck function will check the number of arguments given to the program and process them * accordingly. */
mv/mv.go:68
↓ 1 callers
Function
argumentIsDir
argumentIsDir returns true if the argument is a directory.
rmdir/rmdir.go:50
↓ 1 callers
Function
argumentLoop
Loops through each argument given.
stat/stat.go:214
↓ 1 callers
Function
bufferCPUInfo
bufferCPUInfo returns a newline-delimited string slice of '/proc/cpuinfo'.
uname/uname.go:119
↓ 1 callers
Function
bufferGroups
Opens the group file and returns a buffer of it's contents.
ls/lswin.go:276
↓ 1 callers
Function
bufferGroups
Get a list of groups from getent
ls/ls.go:218
↓ 1 callers
Function
bufferGroups
Opens the group file and returns a buffer of it's contents.
stat/stat.go:93
↓ 1 callers
Function
bufferUsers
Opens the passwd file and returns a buffer of it's contents.
ls/lswin.go:268
↓ 1 callers
Function
bufferUsers
Get a list of users from getent
ls/ls.go:212
↓ 1 callers
Function
bufferUsers
Opens the passwd file and returns a buffer of it's contents.
stat/stat.go:80
↓ 1 callers
Function
calculateArithmetic
Performs arithmetic calculations
expr/expr.go:271
↓ 1 callers
Function
calculateExpressionRanges
Calculate the range of numbers to calculate between expressions.
expr/expr.go:184
↓ 1 callers
Function
calculateExpressions
Calculate each result between inequality expressions
expr/expr.go:207
↓ 1 callers
Function
calculateInequalities
Returns 1 for true, 0 for false, or any
expr/expr.go:244
↓ 1 callers
Function
characterCount
* 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 callers
Function
checkForHiddenFiles
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 callers
Function
checkForHiddenFiles
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 callers
Function
checkIfNoArgumentsAreGiven
Print an error and exit the program if there are no arguments.
expr/expr.go:91
↓ 1 callers
Function
checkIfSymlink
If the file is a symbolic link, resolve it and print the mode type of that location.
ls/lswin.go:654
↓ 1 callers
Function
checkIfSymlink
If the file is a symbolic link, resolve it and print the mode type of that location.
ls/ls.go:585
↓ 1 callers
Function
checkSuffix
Checks if a suffix is set and prints the basename accordingly.
basename/basename.go:114
↓ 1 callers
Function
checkZero
Used in multiFilePrinter for checking if zeroMode is enabled.
basename/basename.go:137
↓ 1 callers
Function
countMaxIDLength
Determines the max ID length.
ls/lswin.go:449
↓ 1 callers
Function
countMaxIDLength
Determines the max ID length.
ls/ls.go:380
↓ 1 callers
Function
countMaxSizeLength
Determines the max character length of file size and user/group names/ids.
ls/lswin.go:431
↓ 1 callers
Function
countMaxSizeLength
Determines the max character length of file size and user/group names/ids.
ls/ls.go:362
↓ 1 callers
Function
countRows
Returns the number of rows to print
ls/lswin.go:500
↓ 1 callers
Function
countRows
Returns the number of rows to print
ls/ls.go:431
↓ 1 callers
Function
countTotalCharLength
Counts char length up to maximum terminal width
ls/lswin.go:458
↓ 1 callers
Function
countTotalCharLength
Counts char length up to maximum terminal width
ls/ls.go:389
↓ 1 callers
Function
dateFormatCheck
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 callers
Function
dateFormatCheck
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