From 26f5ba66f97e90d2d806f0b6d6fd44beb49fae3b Mon Sep 17 00:00:00 2001 From: Alessio Perugini Date: Mon, 13 Jan 2025 17:29:03 +0100 Subject: [PATCH] pkg: replace algorithms with go.bug.st/f --- commands/service_board_list.go | 2 +- commands/service_settings.go | 2 +- commands/service_upload.go | 2 +- internal/algorithms/slices_test.go | 2 +- internal/arduino/builder/core.go | 2 +- internal/arduino/builder/internal/preprocessor/gcc.go | 2 +- internal/arduino/builder/internal/utils/utils.go | 2 +- internal/arduino/builder/libraries.go | 2 +- internal/arduino/builder/linker.go | 2 +- internal/arduino/builder/sketch.go | 2 +- internal/arduino/sketch/sketch.go | 2 +- internal/cli/arguments/completion.go | 2 +- internal/cli/arguments/port.go | 2 +- internal/cli/arguments/sketch.go | 2 +- internal/cli/config/config.go | 2 +- internal/cli/config/set.go | 2 +- internal/cli/feedback/result/rpc.go | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/commands/service_board_list.go b/commands/service_board_list.go index daf7ca57a87..1d1bf7acff5 100644 --- a/commands/service_board_list.go +++ b/commands/service_board_list.go @@ -22,12 +22,12 @@ import ( "github.com/arduino/arduino-cli/commands/cmderrors" "github.com/arduino/arduino-cli/commands/internal/instances" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/arduino-cli/internal/arduino/discovery/discoverymanager" "github.com/arduino/arduino-cli/internal/i18n" "github.com/arduino/arduino-cli/pkg/fqbn" rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" "github.com/sirupsen/logrus" + "go.bug.st/f" ) // BoardList returns a list of boards found by the loaded discoveries. diff --git a/commands/service_settings.go b/commands/service_settings.go index d38f4a95cfd..7a0f7f252ae 100644 --- a/commands/service_settings.go +++ b/commands/service_settings.go @@ -22,10 +22,10 @@ import ( "reflect" "github.com/arduino/arduino-cli/commands/cmderrors" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/arduino-cli/internal/cli/configuration" "github.com/arduino/arduino-cli/internal/go-configmap" rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" + "go.bug.st/f" "google.golang.org/protobuf/proto" "gopkg.in/yaml.v3" ) diff --git a/commands/service_upload.go b/commands/service_upload.go index 2e5e9272d51..36e185cb5e3 100644 --- a/commands/service_upload.go +++ b/commands/service_upload.go @@ -26,7 +26,6 @@ import ( "github.com/arduino/arduino-cli/commands/cmderrors" "github.com/arduino/arduino-cli/commands/internal/instances" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/arduino-cli/internal/arduino/cores" "github.com/arduino/arduino-cli/internal/arduino/cores/packagemanager" "github.com/arduino/arduino-cli/internal/arduino/globals" @@ -39,6 +38,7 @@ import ( serialutils "github.com/arduino/go-serial-utils" discovery "github.com/arduino/pluggable-discovery-protocol-handler/v2" "github.com/sirupsen/logrus" + "go.bug.st/f" ) // SupportedUserFields returns a SupportedUserFieldsResponse containing all the UserFields supported diff --git a/internal/algorithms/slices_test.go b/internal/algorithms/slices_test.go index 8ef58c660a9..a18037a7594 100644 --- a/internal/algorithms/slices_test.go +++ b/internal/algorithms/slices_test.go @@ -19,8 +19,8 @@ import ( "strings" "testing" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/stretchr/testify/require" + "go.bug.st/f" ) func TestFilter(t *testing.T) { diff --git a/internal/arduino/builder/core.go b/internal/arduino/builder/core.go index f407ed60c41..f541eaeda41 100644 --- a/internal/arduino/builder/core.go +++ b/internal/arduino/builder/core.go @@ -22,12 +22,12 @@ import ( "os" "strings" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/arduino-cli/internal/arduino/builder/cpp" "github.com/arduino/arduino-cli/internal/arduino/builder/internal/utils" "github.com/arduino/arduino-cli/internal/buildcache" "github.com/arduino/arduino-cli/internal/i18n" "github.com/arduino/go-paths-helper" + "go.bug.st/f" ) // buildCore fixdoc diff --git a/internal/arduino/builder/internal/preprocessor/gcc.go b/internal/arduino/builder/internal/preprocessor/gcc.go index bfcc9512e0c..cbf156dfae6 100644 --- a/internal/arduino/builder/internal/preprocessor/gcc.go +++ b/internal/arduino/builder/internal/preprocessor/gcc.go @@ -21,11 +21,11 @@ import ( "fmt" "strings" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/arduino-cli/internal/arduino/builder/cpp" "github.com/arduino/arduino-cli/internal/i18n" "github.com/arduino/go-paths-helper" "github.com/arduino/go-properties-orderedmap" + "go.bug.st/f" ) // GCC performs a run of the gcc preprocess (macro/includes expansion). The function outputs the result diff --git a/internal/arduino/builder/internal/utils/utils.go b/internal/arduino/builder/internal/utils/utils.go index d0cb2cec48c..4b4d5b79416 100644 --- a/internal/arduino/builder/internal/utils/utils.go +++ b/internal/arduino/builder/internal/utils/utils.go @@ -21,9 +21,9 @@ import ( "strings" "unicode" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/go-paths-helper" "github.com/sirupsen/logrus" + "go.bug.st/f" "golang.org/x/text/runes" "golang.org/x/text/transform" "golang.org/x/text/unicode/norm" diff --git a/internal/arduino/builder/libraries.go b/internal/arduino/builder/libraries.go index f5648a09596..6bb28f96ed2 100644 --- a/internal/arduino/builder/libraries.go +++ b/internal/arduino/builder/libraries.go @@ -20,12 +20,12 @@ import ( "strings" "time" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/arduino-cli/internal/arduino/builder/cpp" "github.com/arduino/arduino-cli/internal/arduino/libraries" "github.com/arduino/arduino-cli/internal/i18n" "github.com/arduino/go-paths-helper" "github.com/arduino/go-properties-orderedmap" + "go.bug.st/f" ) // nolint diff --git a/internal/arduino/builder/linker.go b/internal/arduino/builder/linker.go index e7d91811890..20032608db5 100644 --- a/internal/arduino/builder/linker.go +++ b/internal/arduino/builder/linker.go @@ -18,9 +18,9 @@ package builder import ( "strings" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/arduino-cli/internal/i18n" "github.com/arduino/go-paths-helper" + "go.bug.st/f" ) // link fixdoc diff --git a/internal/arduino/builder/sketch.go b/internal/arduino/builder/sketch.go index 45612d9d313..1f64d207c81 100644 --- a/internal/arduino/builder/sketch.go +++ b/internal/arduino/builder/sketch.go @@ -25,11 +25,11 @@ import ( "strings" "fortio.org/safecast" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/arduino-cli/internal/arduino/builder/cpp" "github.com/arduino/arduino-cli/internal/i18n" "github.com/arduino/go-paths-helper" "github.com/marcinbor85/gohex" + "go.bug.st/f" ) var ( diff --git a/internal/arduino/sketch/sketch.go b/internal/arduino/sketch/sketch.go index 5cdfb6f3ee8..015be0b1f56 100644 --- a/internal/arduino/sketch/sketch.go +++ b/internal/arduino/sketch/sketch.go @@ -24,11 +24,11 @@ import ( "strings" "github.com/arduino/arduino-cli/commands/cmderrors" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/arduino-cli/internal/arduino/globals" "github.com/arduino/arduino-cli/internal/i18n" rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" "github.com/arduino/go-paths-helper" + "go.bug.st/f" ) // Sketch holds all the files composing a sketch diff --git a/internal/cli/arguments/completion.go b/internal/cli/arguments/completion.go index a8867c51cf2..9b6678fe9ac 100644 --- a/internal/cli/arguments/completion.go +++ b/internal/cli/arguments/completion.go @@ -18,9 +18,9 @@ package arguments import ( "context" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/arduino-cli/internal/cli/instance" rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" + "go.bug.st/f" ) // GetInstalledBoards is an helper function useful to autocomplete. diff --git a/internal/cli/arguments/port.go b/internal/cli/arguments/port.go index fea0b475db5..1df918210e3 100644 --- a/internal/cli/arguments/port.go +++ b/internal/cli/arguments/port.go @@ -23,11 +23,11 @@ import ( "github.com/arduino/arduino-cli/commands" "github.com/arduino/arduino-cli/commands/cmderrors" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/arduino-cli/internal/i18n" rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" "github.com/sirupsen/logrus" "github.com/spf13/cobra" + "go.bug.st/f" ) // Port contains the port arguments result. diff --git a/internal/cli/arguments/sketch.go b/internal/cli/arguments/sketch.go index 8a912e0dbc8..7f76f86e98c 100644 --- a/internal/cli/arguments/sketch.go +++ b/internal/cli/arguments/sketch.go @@ -18,12 +18,12 @@ package arguments import ( "context" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/arduino-cli/internal/cli/feedback" "github.com/arduino/arduino-cli/internal/i18n" rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" "github.com/arduino/go-paths-helper" "github.com/sirupsen/logrus" + "go.bug.st/f" ) // InitSketchPath returns an instance of paths.Path pointing to sketchPath. diff --git a/internal/cli/config/config.go b/internal/cli/config/config.go index d05f43ff77c..dd42eb71213 100644 --- a/internal/cli/config/config.go +++ b/internal/cli/config/config.go @@ -20,12 +20,12 @@ import ( "os" "strings" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/arduino-cli/internal/cli/feedback" "github.com/arduino/arduino-cli/internal/i18n" rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" "github.com/arduino/go-paths-helper" "github.com/spf13/cobra" + "go.bug.st/f" ) // NewCommand created a new `config` command diff --git a/internal/cli/config/set.go b/internal/cli/config/set.go index 34c1d3168e2..34adb362811 100644 --- a/internal/cli/config/set.go +++ b/internal/cli/config/set.go @@ -20,12 +20,12 @@ import ( "encoding/json" "os" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/arduino-cli/internal/cli/feedback" "github.com/arduino/arduino-cli/internal/i18n" rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" "github.com/sirupsen/logrus" "github.com/spf13/cobra" + "go.bug.st/f" ) func initSetCommand(srv rpc.ArduinoCoreServiceServer) *cobra.Command { diff --git a/internal/cli/feedback/result/rpc.go b/internal/cli/feedback/result/rpc.go index a1b464a89b1..9798e59584a 100644 --- a/internal/cli/feedback/result/rpc.go +++ b/internal/cli/feedback/result/rpc.go @@ -20,10 +20,10 @@ import ( "fmt" "slices" - f "github.com/arduino/arduino-cli/internal/algorithms" "github.com/arduino/arduino-cli/internal/i18n" "github.com/arduino/arduino-cli/internal/orderedmap" rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1" + "go.bug.st/f" semver "go.bug.st/relaxed-semver" )