refactor: now utils is an internal package (#166)
Let us make internal everything because this is not a library.
This commit is contained in:
parent
a58dff3050
commit
a4ae94b5ec
|
@ -6,7 +6,7 @@ import (
|
||||||
ooni "github.com/ooni/probe-cli"
|
ooni "github.com/ooni/probe-cli"
|
||||||
"github.com/ooni/probe-cli/internal/log/handlers/batch"
|
"github.com/ooni/probe-cli/internal/log/handlers/batch"
|
||||||
"github.com/ooni/probe-cli/internal/log/handlers/cli"
|
"github.com/ooni/probe-cli/internal/log/handlers/cli"
|
||||||
"github.com/ooni/probe-cli/utils"
|
"github.com/ooni/probe-cli/internal/utils"
|
||||||
"github.com/ooni/probe-cli/version"
|
"github.com/ooni/probe-cli/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
"github.com/apex/log"
|
"github.com/apex/log"
|
||||||
"github.com/ooni/probe-cli/internal/crashreport"
|
"github.com/ooni/probe-cli/internal/crashreport"
|
||||||
"github.com/ooni/probe-cli/utils"
|
"github.com/ooni/probe-cli/internal/utils"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
|
|
||||||
"github.com/apex/log"
|
"github.com/apex/log"
|
||||||
"github.com/ooni/probe-cli/internal/enginex"
|
"github.com/ooni/probe-cli/internal/enginex"
|
||||||
"github.com/ooni/probe-cli/utils"
|
"github.com/ooni/probe-cli/internal/utils"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
db "upper.io/db.v3"
|
db "upper.io/db.v3"
|
||||||
"upper.io/db.v3/lib/sqlbuilder"
|
"upper.io/db.v3/lib/sqlbuilder"
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"github.com/apex/log"
|
"github.com/apex/log"
|
||||||
"github.com/fatih/color"
|
"github.com/fatih/color"
|
||||||
colorable "github.com/mattn/go-colorable"
|
colorable "github.com/mattn/go-colorable"
|
||||||
"github.com/ooni/probe-cli/utils"
|
"github.com/ooni/probe-cli/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Default handler outputting to stderr.
|
// Default handler outputting to stderr.
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/apex/log"
|
"github.com/apex/log"
|
||||||
"github.com/ooni/probe-cli/utils"
|
"github.com/ooni/probe-cli/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func statusIcon(ok bool) string {
|
func statusIcon(ok bool) string {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
|
|
||||||
"github.com/apex/log"
|
"github.com/apex/log"
|
||||||
"github.com/ooni/probe-cli/internal/database"
|
"github.com/ooni/probe-cli/internal/database"
|
||||||
"github.com/ooni/probe-cli/utils"
|
"github.com/ooni/probe-cli/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func formatSpeed(speed float64) string {
|
func formatSpeed(speed float64) string {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
ooni "github.com/ooni/probe-cli"
|
ooni "github.com/ooni/probe-cli"
|
||||||
"github.com/ooni/probe-cli/internal/database"
|
"github.com/ooni/probe-cli/internal/database"
|
||||||
"github.com/ooni/probe-cli/utils/shutil"
|
"github.com/ooni/probe-cli/internal/utils/shutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newTestingContext(t *testing.T) *ooni.Context {
|
func newTestingContext(t *testing.T) *ooni.Context {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
|
|
||||||
"github.com/apex/log"
|
"github.com/apex/log"
|
||||||
"github.com/ooni/probe-cli/internal/database"
|
"github.com/ooni/probe-cli/internal/database"
|
||||||
"github.com/ooni/probe-cli/utils"
|
"github.com/ooni/probe-cli/internal/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MeasurementJSON prints the JSON of a measurement
|
// MeasurementJSON prints the JSON of a measurement
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/ooni/probe-cli/utils/homedir"
|
"github.com/ooni/probe-cli/internal/utils/homedir"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RequiredDirs returns the required ooni home directories
|
// RequiredDirs returns the required ooni home directories
|
2
ooni.go
2
ooni.go
|
@ -12,7 +12,7 @@ import (
|
||||||
"github.com/ooni/probe-cli/internal/config"
|
"github.com/ooni/probe-cli/internal/config"
|
||||||
"github.com/ooni/probe-cli/internal/database"
|
"github.com/ooni/probe-cli/internal/database"
|
||||||
"github.com/ooni/probe-cli/internal/enginex"
|
"github.com/ooni/probe-cli/internal/enginex"
|
||||||
"github.com/ooni/probe-cli/utils"
|
"github.com/ooni/probe-cli/internal/utils"
|
||||||
engine "github.com/ooni/probe-engine"
|
engine "github.com/ooni/probe-engine"
|
||||||
"github.com/ooni/probe-engine/model"
|
"github.com/ooni/probe-engine/model"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user