https://github.com/morrismorrison/gutils
go utils
https://github.com/morrismorrison/gutils
Last synced: over 1 year ago
JSON representation
go utils
- Host: GitHub
- URL: https://github.com/morrismorrison/gutils
- Owner: MorrisMorrison
- Created: 2021-12-05T00:51:05.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-03T03:23:09.000Z (over 1 year ago)
- Last Synced: 2025-01-24T09:28:00.643Z (over 1 year ago)
- Language: Go
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gutils
## gerror
FailOnError(e error)
## gio
- ReadLinesFromFile(file *os.File, ignoreWhitespace bool) ([]string, error)
- ReadLinesFromPath(path string, ignoreWhitespace bool) ([]string, error)
## glogger
NewLogger() *Logger
- (l *Logger) Log(level LogLevel, message string)
- (l *Logger) Logf(level LogLevel, format string, v ...interface{})
- (l *Logger) Info(message string)
- (l *Logger) Infof(format string, v ...interface{})
- (l *Logger) Debug(message string)
- (l *Logger) Debugf(format string, v ...interface{})
- (l *Logger) Warning(message string)
- (l *Logger) Warningf(format string, v ...interface{})
- (l *Logger) Error(err error, message string)
- (l *Logger) Errorf(err error, format string, v ...interface{})
## gollections
- Any[T comparable](slice []T, predicate func(T) bool) bool
- All[T comparable](slice []T, predicate func(T) bool) bool
- Equals[T comparable](slice1 []T, slice2 []T, comparator func(T, T) bool) bool
- GetColumn(matrix [][]int, colNum int) []int
- GetRow(matrix [][]int, rowNum int) []int
- GetSum(matrix [][]int) int
- ReplaceByMatchingValue(matrix [][]int, comparisonValue int) [][]int
- RemoveRow(slice [][]int, s int) [][]int