Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Test
run: |
go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
go test -tags=pcre2 rare/pkg/matchers/fastregex
go test -tags=pcre2 github.com/zix99/rare/pkg/matchers/fastregex
- name: StaticCheck
run: |
go run honnef.co/go/tools/cmd/[email protected] ./...
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ tasks:
desc: Run all tests
cmds:
- go test ./...
- go test -tags=pcre2 rare/pkg/matchers/fastregex
- go test -tags=pcre2 github.com/zix99/rare/pkg/matchers/fastregex

test:acceptance:
desc: Run acceptance tests
Expand Down
13 changes: 7 additions & 6 deletions cmd/analyze.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package cmd

import (
"rare/cmd/helpers"
"rare/pkg/aggregation"
"rare/pkg/color"
"rare/pkg/humanize"
"rare/pkg/logger"
"rare/pkg/multiterm"
"strconv"

"github.com/zix99/rare/cmd/helpers"
"github.com/zix99/rare/pkg/aggregation"
"github.com/zix99/rare/pkg/color"
"github.com/zix99/rare/pkg/humanize"
"github.com/zix99/rare/pkg/logger"
"github.com/zix99/rare/pkg/multiterm"

"github.com/urfave/cli/v2"
)

Expand Down
3 changes: 2 additions & 1 deletion cmd/analyze_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package cmd

import (
"rare/cmd/helpers"
"testing"

"github.com/zix99/rare/cmd/helpers"
)

func TestAnalyze(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions cmd/bargraph.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package cmd

import (
"rare/cmd/helpers"
"rare/pkg/aggregation"
"rare/pkg/csv"
"rare/pkg/multiterm/termrenderers"
"github.com/zix99/rare/cmd/helpers"
"github.com/zix99/rare/pkg/aggregation"
"github.com/zix99/rare/pkg/csv"
"github.com/zix99/rare/pkg/multiterm/termrenderers"

"github.com/urfave/cli/v2"
)
Expand Down
5 changes: 3 additions & 2 deletions cmd/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package cmd
import (
"fmt"
"os"
"rare/pkg/logger"
"rare/pkg/testutil"
"testing"

"github.com/zix99/rare/pkg/logger"
"github.com/zix99/rare/pkg/testutil"

"github.com/stretchr/testify/assert"
"github.com/urfave/cli/v2"
)
Expand Down
7 changes: 4 additions & 3 deletions cmd/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
"io"
"io/fs"
"os"
"rare/cmd/helpers"
"rare/docs"
"rare/pkg/markdowncli"
"strings"

"github.com/zix99/rare/cmd/helpers"
"github.com/zix99/rare/docs"
"github.com/zix99/rare/pkg/markdowncli"

"github.com/urfave/cli/v2"
)

Expand Down
5 changes: 3 additions & 2 deletions cmd/docs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"bufio"
"bytes"
"io"
"rare/docs"
"rare/pkg/markdowncli"
"strings"
"testing"

"github.com/zix99/rare/docs"
"github.com/zix99/rare/pkg/markdowncli"

"github.com/stretchr/testify/assert"
)

Expand Down
13 changes: 7 additions & 6 deletions cmd/expressions.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ import (
"fmt"
"io"
"os"
"rare/pkg/color"
"rare/pkg/expressions"
"rare/pkg/expressions/exprofiler"
"rare/pkg/expressions/funclib"
"rare/pkg/humanize"
"rare/pkg/minijson"
"sort"
"strconv"
"strings"
"time"

"github.com/zix99/rare/pkg/color"
"github.com/zix99/rare/pkg/expressions"
"github.com/zix99/rare/pkg/expressions/exprofiler"
"github.com/zix99/rare/pkg/expressions/funclib"
"github.com/zix99/rare/pkg/humanize"
"github.com/zix99/rare/pkg/minijson"

"github.com/urfave/cli/v2"
)

Expand Down
7 changes: 4 additions & 3 deletions cmd/expressions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package cmd

import (
"os"
"rare/pkg/expressions"
"rare/pkg/expressions/funclib"
"rare/pkg/testutil"
"testing"

"github.com/zix99/rare/pkg/expressions"
"github.com/zix99/rare/pkg/expressions/funclib"
"github.com/zix99/rare/pkg/testutil"

"github.com/stretchr/testify/assert"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"os"
"unicode/utf8"

"rare/cmd/helpers"
"rare/pkg/color"
"rare/pkg/logger"
"github.com/zix99/rare/cmd/helpers"
"github.com/zix99/rare/pkg/color"
"github.com/zix99/rare/pkg/logger"

"github.com/urfave/cli/v2"
)
Expand Down
5 changes: 3 additions & 2 deletions cmd/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package cmd

import (
"os"
"rare/cmd/helpers"
"rare/pkg/testutil"
"testing"

"github.com/zix99/rare/cmd/helpers"
"github.com/zix99/rare/pkg/testutil"

"github.com/stretchr/testify/assert"
"github.com/urfave/cli/v2"
)
Expand Down
11 changes: 6 additions & 5 deletions cmd/fuzzy.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ package cmd
import (
"fmt"
"os"
"rare/cmd/helpers"
"rare/pkg/aggregation"
"rare/pkg/color"
"rare/pkg/multiterm"
"rare/pkg/multiterm/termrenderers"

"github.com/zix99/rare/cmd/helpers"
"github.com/zix99/rare/pkg/aggregation"
"github.com/zix99/rare/pkg/color"
"github.com/zix99/rare/pkg/multiterm"
"github.com/zix99/rare/pkg/multiterm/termrenderers"

"github.com/urfave/cli/v2"
)
Expand Down
15 changes: 8 additions & 7 deletions cmd/heatmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package cmd

import (
"fmt"
"rare/cmd/helpers"
"rare/pkg/aggregation"
"rare/pkg/color"
"rare/pkg/csv"
"rare/pkg/expressions"
"rare/pkg/multiterm"
"rare/pkg/multiterm/termrenderers"

"github.com/zix99/rare/cmd/helpers"
"github.com/zix99/rare/pkg/aggregation"
"github.com/zix99/rare/pkg/color"
"github.com/zix99/rare/pkg/csv"
"github.com/zix99/rare/pkg/expressions"
"github.com/zix99/rare/pkg/multiterm"
"github.com/zix99/rare/pkg/multiterm/termrenderers"

"github.com/urfave/cli/v2"
)
Expand Down
17 changes: 9 additions & 8 deletions cmd/helpers/extractorBuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ package helpers
import (
"errors"
"os"
"rare/pkg/expressions"
"rare/pkg/extractor"
"rare/pkg/extractor/batchers"
"rare/pkg/extractor/dirwalk"
"rare/pkg/logger"
"rare/pkg/matchers"
"rare/pkg/matchers/dissect"
"rare/pkg/matchers/fastregex"
"runtime"
"slices"
"strings"

"github.com/zix99/rare/pkg/expressions"
"github.com/zix99/rare/pkg/extractor"
"github.com/zix99/rare/pkg/extractor/batchers"
"github.com/zix99/rare/pkg/extractor/dirwalk"
"github.com/zix99/rare/pkg/logger"
"github.com/zix99/rare/pkg/matchers"
"github.com/zix99/rare/pkg/matchers/dissect"
"github.com/zix99/rare/pkg/matchers/fastregex"

"github.com/urfave/cli/v2"
)

Expand Down
3 changes: 2 additions & 1 deletion cmd/helpers/extractorBuilder_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package helpers

import (
"rare/pkg/testutil"
"testing"

"github.com/zix99/rare/pkg/testutil"

"github.com/stretchr/testify/assert"
"github.com/urfave/cli/v2"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/helpers/formatter.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package helpers

import (
"rare/pkg/logger"
"rare/pkg/multiterm/termformat"
"github.com/zix99/rare/pkg/logger"
"github.com/zix99/rare/pkg/multiterm/termformat"

"github.com/urfave/cli/v2"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/helpers/output.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package helpers

import (
"rare/pkg/csv"
"rare/pkg/multiterm"
"rare/pkg/multiterm/termstate"
"github.com/zix99/rare/pkg/csv"
"github.com/zix99/rare/pkg/multiterm"
"github.com/zix99/rare/pkg/multiterm/termstate"

"github.com/urfave/cli/v2"
)
Expand Down
5 changes: 3 additions & 2 deletions cmd/helpers/output_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package helpers

import (
"rare/pkg/aggregation"
"rare/pkg/csv"
"testing"

"github.com/zix99/rare/pkg/aggregation"
"github.com/zix99/rare/pkg/csv"

"github.com/stretchr/testify/assert"
"github.com/urfave/cli/v2"
)
Expand Down
5 changes: 3 additions & 2 deletions cmd/helpers/scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package helpers

import (
"errors"
"rare/pkg/logger"
"rare/pkg/multiterm/termscaler"

"github.com/zix99/rare/pkg/logger"
"github.com/zix99/rare/pkg/multiterm/termscaler"

"github.com/urfave/cli/v2"
)
Expand Down
7 changes: 4 additions & 3 deletions cmd/helpers/sorting.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package helpers
import (
"errors"
"fmt"
"rare/pkg/aggregation/sorting"
"rare/pkg/logger"
"rare/pkg/stringSplitter"
"strings"

"github.com/zix99/rare/pkg/aggregation/sorting"
"github.com/zix99/rare/pkg/logger"
"github.com/zix99/rare/pkg/stringSplitter"

"github.com/urfave/cli/v2"
)

Expand Down
3 changes: 2 additions & 1 deletion cmd/helpers/sorting_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package helpers

import (
"rare/pkg/aggregation/sorting"
"testing"

"github.com/zix99/rare/pkg/aggregation/sorting"

"github.com/stretchr/testify/assert"
)

Expand Down
11 changes: 6 additions & 5 deletions cmd/helpers/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import (
"fmt"
"io"
"os"
"rare/pkg/color"
"rare/pkg/extractor"
"rare/pkg/extractor/batchers"
"rare/pkg/extractor/dirwalk"
"rare/pkg/humanize"

"github.com/zix99/rare/pkg/color"
"github.com/zix99/rare/pkg/extractor"
"github.com/zix99/rare/pkg/extractor/batchers"
"github.com/zix99/rare/pkg/extractor/dirwalk"
"github.com/zix99/rare/pkg/humanize"
)

func FWriteMatchSummary(w io.Writer, matched, total uint64) {
Expand Down
7 changes: 4 additions & 3 deletions cmd/helpers/updatingAggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package helpers
import (
"os"
"os/signal"
"rare/pkg/aggregation"
"rare/pkg/extractor"
"rare/pkg/logger"
"sync"
"time"

"github.com/zix99/rare/pkg/aggregation"
"github.com/zix99/rare/pkg/extractor"
"github.com/zix99/rare/pkg/logger"
)

// RunAggregationLoop is a helper that takes care of output sync
Expand Down
9 changes: 5 additions & 4 deletions cmd/helpers/updatingAggregator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package helpers
import (
"io"
"os"
"rare/pkg/extractor"
"rare/pkg/extractor/batchers"
"rare/pkg/matchers"
"rare/pkg/matchers/fastregex"
"strings"
"testing"

"github.com/zix99/rare/pkg/extractor"
"github.com/zix99/rare/pkg/extractor/batchers"
"github.com/zix99/rare/pkg/matchers"
"github.com/zix99/rare/pkg/matchers/fastregex"

"github.com/stretchr/testify/assert"
)

Expand Down
Loading
Loading