Skip to content

Commit

Permalink
Move resolution package to internal/
Browse files Browse the repository at this point in the history
  • Loading branch information
viktigpetterr committed May 16, 2023
1 parent 329aad1 commit 1e67593
Show file tree
Hide file tree
Showing 120 changed files with 212 additions and 218 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ dist/
/.env
test/resolve/testdata/pip/requirements.txt.venv/
test/resolve/testdata/pip/.requirements.txt.debricked.lock
pkg/scan/testdata/npm/yarn.lock
pkg/resolution/pm/gradle/.gradle-init-script.debricked.groovy
internal/cmd/scan/testdata/npm/yarn.lock
internal/resolution/pm/gradle/.gradle-init-script.debricked.groovy
4 changes: 2 additions & 2 deletions cmd/debricked/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"os"

"github.com/debricked/cli/pkg/cmd/root"
"github.com/debricked/cli/pkg/wire"
"github.com/debricked/cli/internal/cmd/root"
"github.com/debricked/cli/internal/wire"
)

var version string // Set at compile time
Expand Down
2 changes: 1 addition & 1 deletion internal/client/deb_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"strings"
"testing"

"github.com/stretchr/testify/assert"
testdataClient "github.com/debricked/cli/internal/client/testdata/client"
"github.com/stretchr/testify/assert"
)

var client *DebClient
Expand Down
4 changes: 2 additions & 2 deletions internal/cmd/files/files.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package files

import (
"github.com/debricked/cli/pkg/cmd/files/find"
"github.com/debricked/cli/pkg/file"
"github.com/debricked/cli/internal/cmd/files/find"
"github.com/debricked/cli/internal/file"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/files/files_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package files
import (
"testing"

"github.com/debricked/cli/pkg/file"
"github.com/debricked/cli/internal/file"
"github.com/stretchr/testify/assert"
)

Expand Down
8 changes: 4 additions & 4 deletions internal/cmd/report/report.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package report

import (
"github.com/debricked/cli/pkg/cmd/report/license"
"github.com/debricked/cli/pkg/cmd/report/vulnerability"
licenseReport "github.com/debricked/cli/pkg/report/license"
vulnerabilityReport "github.com/debricked/cli/pkg/report/vulnerability"
"github.com/debricked/cli/internal/cmd/report/license"
"github.com/debricked/cli/internal/cmd/report/vulnerability"
licenseReport "github.com/debricked/cli/internal/report/license"
vulnerabilityReport "github.com/debricked/cli/internal/report/vulnerability"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/cmd/report/report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package report
import (
"testing"

"github.com/debricked/cli/pkg/report/license"
"github.com/debricked/cli/pkg/report/vulnerability"
"github.com/debricked/cli/internal/report/license"
"github.com/debricked/cli/internal/report/vulnerability"
"github.com/stretchr/testify/assert"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"path/filepath"

"github.com/debricked/cli/pkg/file"
"github.com/debricked/cli/pkg/resolution"
"github.com/debricked/cli/internal/file"
"github.com/debricked/cli/internal/resolution"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"errors"
"testing"

"github.com/debricked/cli/pkg/file"
"github.com/debricked/cli/pkg/file/testdata"
"github.com/debricked/cli/pkg/resolution"
resolveTestdata "github.com/debricked/cli/pkg/resolution/testdata"
"github.com/debricked/cli/internal/file"
"github.com/debricked/cli/internal/file/testdata"
"github.com/debricked/cli/internal/resolution"
resolveTestdata "github.com/debricked/cli/internal/resolution/testdata"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
)
Expand Down
10 changes: 5 additions & 5 deletions internal/cmd/root/root.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package root

import (
"github.com/debricked/cli/pkg/cmd/files"
"github.com/debricked/cli/pkg/cmd/report"
"github.com/debricked/cli/pkg/cmd/resolve"
"github.com/debricked/cli/pkg/cmd/scan"
"github.com/debricked/cli/pkg/wire"
"github.com/debricked/cli/internal/cmd/files"
"github.com/debricked/cli/internal/cmd/report"
"github.com/debricked/cli/internal/cmd/resolve"
"github.com/debricked/cli/internal/cmd/scan"
"github.com/debricked/cli/internal/wire"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/root/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package root
import (
"testing"

"github.com/debricked/cli/pkg/wire"
"github.com/debricked/cli/internal/wire"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/cmd/scan/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"path/filepath"

"github.com/debricked/cli/pkg/file"
"github.com/debricked/cli/pkg/scan"
"github.com/debricked/cli/internal/file"
"github.com/debricked/cli/internal/scan"
"github.com/fatih/color"
"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/scan/scan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package scan
import (
"testing"

"github.com/debricked/cli/pkg/scan"
"github.com/debricked/cli/internal/scan"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package file

import "github.com/debricked/cli/pkg/resolution/pm"
import "github.com/debricked/cli/internal/resolution/pm"

type IBatch interface {
Files() []string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"path"
"regexp"

"github.com/debricked/cli/pkg/resolution/pm"
"github.com/debricked/cli/internal/resolution/pm"
)

type IBatchFactory interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package file
import (
"testing"

"github.com/debricked/cli/pkg/resolution/pm"
"github.com/debricked/cli/pkg/resolution/pm/testdata"
"github.com/debricked/cli/internal/resolution/pm"
"github.com/debricked/cli/internal/resolution/pm/testdata"
"github.com/stretchr/testify/assert"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package file
import (
"testing"

"github.com/debricked/cli/pkg/resolution/pm/testdata"
"github.com/debricked/cli/internal/resolution/pm/testdata"
"github.com/stretchr/testify/assert"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package testdata

import (
"github.com/debricked/cli/pkg/resolution/file"
"github.com/debricked/cli/pkg/resolution/pm"
"github.com/debricked/cli/internal/resolution/file"
"github.com/debricked/cli/internal/resolution/pm"
)

type BatchFactoryMock struct {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package testdata
import (
"fmt"

"github.com/debricked/cli/pkg/resolution/job"
"github.com/debricked/cli/internal/resolution/job"
)

type JobMock struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"runtime"
"testing"

"github.com/debricked/cli/pkg/resolution/job"
"github.com/debricked/cli/internal/resolution/job"
"github.com/stretchr/testify/assert"
)

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package gomod
import (
"path/filepath"

"github.com/debricked/cli/pkg/resolution/job"
"github.com/debricked/cli/pkg/resolution/pm/util"
"github.com/debricked/cli/pkg/resolution/pm/writer"
"github.com/debricked/cli/internal/resolution/job"
"github.com/debricked/cli/internal/resolution/pm/util"
"github.com/debricked/cli/internal/resolution/pm/writer"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"errors"
"testing"

jobTestdata "github.com/debricked/cli/pkg/resolution/job/testdata"
"github.com/debricked/cli/pkg/resolution/pm/gomod/testdata"
"github.com/debricked/cli/pkg/resolution/pm/writer"
writerTestdata "github.com/debricked/cli/pkg/resolution/pm/writer/testdata"
jobTestdata "github.com/debricked/cli/internal/resolution/job/testdata"
"github.com/debricked/cli/internal/resolution/pm/gomod/testdata"
"github.com/debricked/cli/internal/resolution/pm/writer"
writerTestdata "github.com/debricked/cli/internal/resolution/pm/writer/testdata"
"github.com/stretchr/testify/assert"
)

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gomod

import (
"github.com/debricked/cli/pkg/resolution/job"
"github.com/debricked/cli/pkg/resolution/pm/writer"
"github.com/debricked/cli/internal/resolution/job"
"github.com/debricked/cli/internal/resolution/pm/writer"
)

type Strategy struct {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gradle

import (
"github.com/debricked/cli/pkg/resolution/pm/writer"
"github.com/debricked/cli/internal/resolution/pm/writer"
)

type IInitScriptHandler interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"
"testing"

writerTestdata "github.com/debricked/cli/pkg/resolution/pm/writer/testdata"
writerTestdata "github.com/debricked/cli/internal/resolution/pm/writer/testdata"
"github.com/stretchr/testify/assert"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"path/filepath"
"strings"

"github.com/debricked/cli/pkg/resolution/job"
"github.com/debricked/cli/pkg/resolution/pm/writer"
"github.com/debricked/cli/internal/resolution/job"
"github.com/debricked/cli/internal/resolution/pm/writer"
)

type Job struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"errors"
"testing"

jobTestdata "github.com/debricked/cli/pkg/resolution/job/testdata"
"github.com/debricked/cli/pkg/resolution/pm/gradle/testdata"
"github.com/debricked/cli/pkg/resolution/pm/writer"
writerTestdata "github.com/debricked/cli/pkg/resolution/pm/writer/testdata"
jobTestdata "github.com/debricked/cli/internal/resolution/job/testdata"
"github.com/debricked/cli/internal/resolution/pm/gradle/testdata"
"github.com/debricked/cli/internal/resolution/pm/writer"
writerTestdata "github.com/debricked/cli/internal/resolution/pm/writer/testdata"
"github.com/stretchr/testify/assert"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"sort"
"strings"

"github.com/debricked/cli/pkg/resolution/pm/writer"
"github.com/debricked/cli/internal/resolution/pm/writer"
)

const (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"runtime"
"testing"

writerTestdata "github.com/debricked/cli/pkg/resolution/pm/writer/testdata"
writerTestdata "github.com/debricked/cli/internal/resolution/pm/writer/testdata"

"github.com/debricked/cli/pkg/resolution/pm/writer"
"github.com/debricked/cli/internal/resolution/pm/writer"
"github.com/stretchr/testify/assert"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/fatih/color"

"github.com/debricked/cli/pkg/resolution/job"
"github.com/debricked/cli/pkg/resolution/pm/writer"
"github.com/debricked/cli/internal/resolution/job"
"github.com/debricked/cli/internal/resolution/pm/writer"
)

type Strategy struct {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"path/filepath"

"github.com/debricked/cli/pkg/resolution/job"
"github.com/debricked/cli/internal/resolution/job"
)

type Job struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"
"testing"

jobTestdata "github.com/debricked/cli/pkg/resolution/job/testdata"
"github.com/debricked/cli/pkg/resolution/pm/maven/testdata"
jobTestdata "github.com/debricked/cli/internal/resolution/job/testdata"
"github.com/debricked/cli/internal/resolution/pm/maven/testdata"
"github.com/stretchr/testify/assert"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package maven

import (
"github.com/debricked/cli/pkg/resolution/job"
"github.com/debricked/cli/internal/resolution/job"
)

type Strategy struct {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"path/filepath"
"strings"

"github.com/debricked/cli/pkg/resolution/job"
"github.com/debricked/cli/pkg/resolution/pm/util"
"github.com/debricked/cli/pkg/resolution/pm/writer"
"github.com/debricked/cli/internal/resolution/job"
"github.com/debricked/cli/internal/resolution/pm/util"
"github.com/debricked/cli/internal/resolution/pm/writer"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"strings"
"testing"

jobTestdata "github.com/debricked/cli/pkg/resolution/job/testdata"
"github.com/debricked/cli/pkg/resolution/pm/pip/testdata"
"github.com/debricked/cli/pkg/resolution/pm/writer"
writerTestdata "github.com/debricked/cli/pkg/resolution/pm/writer/testdata"
jobTestdata "github.com/debricked/cli/internal/resolution/job/testdata"
"github.com/debricked/cli/internal/resolution/pm/pip/testdata"
"github.com/debricked/cli/internal/resolution/pm/writer"
writerTestdata "github.com/debricked/cli/internal/resolution/pm/writer/testdata"
"github.com/stretchr/testify/assert"
)

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package pip

import (
"github.com/debricked/cli/pkg/resolution/job"
"github.com/debricked/cli/pkg/resolution/pm/writer"
"github.com/debricked/cli/internal/resolution/job"
"github.com/debricked/cli/internal/resolution/pm/writer"
)

type Strategy struct {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 1e67593

Please sign in to comment.