From fb2ca32004c21e90d62b12e143dd168dae46e449 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Fri, 13 Nov 2020 16:58:14 +0100 Subject: [PATCH] refactor: config is now a private package (#164) We are working on ooniprobe for Debian. Before starting to apply changes to the codebase, I'd like to apply some refactoring steps that I've been thinking about for quite some time. The general concept here is that the purpose of this repository changed since it was designed and now there is probe-engine which is a library, therefore, this repo can be mostly private. --- internal/cli/onboard/onboard.go | 2 +- {config => internal/config}/parser.go | 0 {config => internal/config}/parser_test.go | 0 {config => internal/config}/settings.go | 0 {config => internal/config}/testdata/config-v0.json | 0 {config => internal/config}/testdata/valid-config.json | 0 ooni.go | 2 +- 7 files changed, 2 insertions(+), 2 deletions(-) rename {config => internal/config}/parser.go (100%) rename {config => internal/config}/parser_test.go (100%) rename {config => internal/config}/settings.go (100%) rename {config => internal/config}/testdata/config-v0.json (100%) rename {config => internal/config}/testdata/valid-config.json (100%) diff --git a/internal/cli/onboard/onboard.go b/internal/cli/onboard/onboard.go index 943c16a..82308ad 100644 --- a/internal/cli/onboard/onboard.go +++ b/internal/cli/onboard/onboard.go @@ -7,8 +7,8 @@ import ( "github.com/apex/log" "github.com/fatih/color" ooni "github.com/ooni/probe-cli" - "github.com/ooni/probe-cli/config" "github.com/ooni/probe-cli/internal/cli/root" + "github.com/ooni/probe-cli/internal/config" "github.com/ooni/probe-cli/internal/output" "github.com/pkg/errors" "gopkg.in/AlecAivazis/survey.v1" diff --git a/config/parser.go b/internal/config/parser.go similarity index 100% rename from config/parser.go rename to internal/config/parser.go diff --git a/config/parser_test.go b/internal/config/parser_test.go similarity index 100% rename from config/parser_test.go rename to internal/config/parser_test.go diff --git a/config/settings.go b/internal/config/settings.go similarity index 100% rename from config/settings.go rename to internal/config/settings.go diff --git a/config/testdata/config-v0.json b/internal/config/testdata/config-v0.json similarity index 100% rename from config/testdata/config-v0.json rename to internal/config/testdata/config-v0.json diff --git a/config/testdata/valid-config.json b/internal/config/testdata/valid-config.json similarity index 100% rename from config/testdata/valid-config.json rename to internal/config/testdata/valid-config.json diff --git a/ooni.go b/ooni.go index b64f986..e2fcc6e 100644 --- a/ooni.go +++ b/ooni.go @@ -8,8 +8,8 @@ import ( "syscall" "github.com/apex/log" - "github.com/ooni/probe-cli/config" "github.com/ooni/probe-cli/internal/bindata" + "github.com/ooni/probe-cli/internal/config" "github.com/ooni/probe-cli/internal/database" "github.com/ooni/probe-cli/internal/enginex" "github.com/ooni/probe-cli/utils"