Showing 98 of 159 total issues
Method RegexpSet.FindAllString
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (set *RegexpSet) FindAllString(pattern string, s string, n int, useStore bool, key string) []string {
Function BuildGifAnimationSimpleRead
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func BuildGifAnimationSimpleRead(src *gif.GIF, delay int, names []string, f ToPalettedFunc, consistentSize bool) (*gif.GIF, error) {
Function TimeDeltaDowString
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func TimeDeltaDowString(base time.Time, wantDowS string, deltaUnits int, wantInclusive bool, wantStartOfDay bool) (time.Time, error) {
Function LogOrNotAny
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func LogOrNotAny(ctx context.Context, logger *slog.Logger, level slog.Level, msg string, args ...any) {
Function TimeDeltaDow
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func TimeDeltaDow(base time.Time, wantDow time.Weekday, deltaUnits int, wantInclusive bool, wantStartOfDay bool) (time.Time, error) {
Function TimeDeltaDowInt
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func TimeDeltaDowInt(base time.Time, wantDow time.Weekday, deltaUnits int, wantInclusive bool, wantStartOfDay bool) (time.Time, error) {
Function ReadCSVFilesSingleColumnValuesString
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func ReadCSVFilesSingleColumnValuesString(files []string, sep rune, hasHeader, trimSpace bool, colIdx uint, condenseUniqueSort bool) ([]string, error) {
Method RegexpSet.FindAllStringSubmatch
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (set *RegexpSet) FindAllStringSubmatch(pattern string, s string, n int, useStore bool, key string) [][]string {
Function ReadCSVFileSingleColumnValuesString
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func ReadCSVFileSingleColumnValuesString(filename string, sep rune, hasHeader, trimSpace bool, colIdx uint, condenseUniqueSort bool) ([]string, error) {
Function MergeFilterCSVFiles
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func MergeFilterCSVFiles(inPaths []string, outPath string, inComma rune, inStripBom bool, andFilter map[string]stringsutil.MatchInfo) error {
Function UserToAbsolute
has 5 return statements (exceeds 4 allowed). Open
Open
func UserToAbsolute(file string) (string, error) {
file = strings.TrimSpace(file)
parts := strings.Split(file, string(os.PathSeparator))
if len(parts) == 0 {
return file, nil
Method String.UnmarshalJSON
has 5 return statements (exceeds 4 allowed). Open
Open
func (s *String) UnmarshalJSON(data []byte) error {
var a any
if err := json.Unmarshal(data, &a); err != nil {
panic(err)
Method MapStringInt.Sorted
has 5 return statements (exceeds 4 allowed). Open
Open
func (msi MapStringInt) Sorted(sortBy string) []Record {
sortBy = strings.ToLower(strings.TrimSpace(sortBy))
records := []Record{}
for name, count := range msi {
records = append(records, Record{Name: name, Value: count})
Method TimeRange.IntersectionDuration
has 5 return statements (exceeds 4 allowed). Open
Open
func (tr *TimeRange) IntersectionDuration(tr2 TimeRange) time.Duration {
tr.Normalize()
tr2.Normalize()
if tr2.Min.After(tr.Max) || tr2.Max.Before(tr.Min) {
// No overlap
Function ReadImageHTTP
has 5 return statements (exceeds 4 allowed). Open
Open
func ReadImageHTTP(imageURL string) (image.Image, string, error) {
imageURL = strings.TrimSpace(imageURL)
if !urlutil.IsHTTP(imageURL, true, true) {
return nil, "", errors.New("url is not valid")
}
Function NumQuartersInt32
has 5 return statements (exceeds 4 allowed). Open
Open
func NumQuartersInt32(start, end int32) (int, error) {
start, end = mathutil.MinMaxInt32(start, end)
if !IsQuarterInt32(start) {
return -1, fmt.Errorf("quarterInt32 is not valid [%v] Must end in [1-4]", start)
}
Function BinFromDuration
has 5 return statements (exceeds 4 allowed). Open
Open
func BinFromDuration(d time.Duration) Bin {
// cycle through default bins with non-standard durations.
defBins := BinsDefault()
for i, bin := range defBins { // asc
if d == bin.Duration {
Function CreateFileWithLines
has 5 return statements (exceeds 4 allowed). Open
Open
func CreateFileWithLines(filename string, lines []string, lineSuffix string, useBuffer bool) error {
f, err := os.Create(filename)
if err != nil {
return err
}
Function IsType
has 5 return statements (exceeds 4 allowed). Open
Open
func IsType(mediaType, s string) bool {
mediaType = strings.ToLower(strings.TrimSpace(mediaType))
s = strings.ToLower(strings.TrimSpace(s))
if s == mediaType {
return true
Method Times.RangeUpper
has 5 return statements (exceeds 4 allowed). Open
Open
func (ts Times) RangeUpper(t time.Time, inclusive bool) (time.Time, error) {
if len(ts) == 0 {
return t, ErrEmptyTimeSlice
}
sortedTS := ts.Dedupe()