fix some go issues

This commit is contained in:
Kjeld Schouten
2024-10-17 12:56:56 +02:00
parent 54e019763c
commit 8b691218f1
57 changed files with 103 additions and 103 deletions
@@ -9,7 +9,7 @@ import (
"github.com/Masterminds/semver/v3"
"github.com/go-git/go-git/v5"
"github.com/rs/zerolog/log"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/helper"
)
type ChangelogOptions struct {
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"time"
"github.com/rs/zerolog/log"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/helper"
)
func (o *ChangelogOptions) Render() error {
@@ -6,7 +6,7 @@ import (
"os"
"github.com/go-playground/validator/v10"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/helper"
"github.com/knadh/koanf/parsers/yaml"
"github.com/knadh/koanf/providers/file"
+4 -4
View File
@@ -8,10 +8,10 @@ import (
"strings"
"github.com/rs/zerolog/log"
"github.com/truecharts/private/clustertool/pkg/charts/helmignore"
"github.com/truecharts/private/clustertool/pkg/charts/image"
"github.com/truecharts/private/clustertool/pkg/charts/readme"
"github.com/truecharts/private/clustertool/pkg/charts/version"
"github.com/truecharts/public/clustertool/pkg/charts/helmignore"
"github.com/truecharts/public/clustertool/pkg/charts/image"
"github.com/truecharts/public/clustertool/pkg/charts/readme"
"github.com/truecharts/public/clustertool/pkg/charts/version"
)
// UpdateChartFile updates the specified Chart.yaml file with an optional bump parameter.
@@ -4,7 +4,7 @@ import (
"reflect"
"testing"
"github.com/truecharts/private/clustertool/pkg/charts/image"
"github.com/truecharts/public/clustertool/pkg/charts/image"
)
func TestSetAppVersionFromImage(t *testing.T) {
+3 -3
View File
@@ -11,9 +11,9 @@ import (
"github.com/rs/zerolog/log"
"github.com/truecharts/private/clustertool/pkg/charts/chartFile"
"github.com/truecharts/private/clustertool/pkg/fluxhandler"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/charts/chartFile"
"github.com/truecharts/public/clustertool/pkg/fluxhandler"
"github.com/truecharts/public/clustertool/pkg/helper"
)
func LoadGPGKey() error {
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/private/clustertool/pkg/kubectlcmds"
"github.com/truecharts/public/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/kubectlcmds"
)
func init() {
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"time"
"github.com/rs/zerolog/log"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/helper"
"helm.sh/helm/v3/pkg/action"
"helm.sh/helm/v3/pkg/chart/loader"
"helm.sh/helm/v3/pkg/cli"
+1 -1
View File
@@ -14,7 +14,7 @@ import (
"github.com/rs/zerolog/log"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/helper"
"golang.org/x/crypto/ssh"
corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/yaml"
+3 -3
View File
@@ -9,9 +9,9 @@ import (
talhelperCfg "github.com/budimanjojo/talhelper/v3/pkg/config"
"github.com/budimanjojo/talhelper/v3/pkg/generate"
"github.com/truecharts/private/clustertool/embed"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/private/clustertool/pkg/initfiles"
"github.com/truecharts/public/clustertool/embed"
"github.com/truecharts/public/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/initfiles"
)
func GenApply(node string, extraFlags []string) []string {
+6 -6
View File
@@ -12,12 +12,12 @@ import (
talhelperCfg "github.com/budimanjojo/talhelper/v3/pkg/config"
"github.com/budimanjojo/talhelper/v3/pkg/generate"
"github.com/truecharts/private/clustertool/embed"
"github.com/truecharts/private/clustertool/pkg/fluxhandler"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/private/clustertool/pkg/kubectlcmds"
"github.com/truecharts/private/clustertool/pkg/nodestatus"
"github.com/truecharts/private/clustertool/pkg/sops"
"github.com/truecharts/public/clustertool/embed"
"github.com/truecharts/public/clustertool/pkg/fluxhandler"
"github.com/truecharts/public/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/kubectlcmds"
"github.com/truecharts/public/clustertool/pkg/nodestatus"
"github.com/truecharts/public/clustertool/pkg/sops"
)
var HelmRepos map[string]*fluxhandler.HelmRepo
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"time"
"github.com/rs/zerolog/log"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/private/clustertool/pkg/nodestatus"
"github.com/truecharts/public/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/nodestatus"
)
func ExecCmd(cmd string) {
+3 -3
View File
@@ -17,9 +17,9 @@ import (
"github.com/fatih/color"
sideroConfig "github.com/siderolabs/talos/pkg/machinery/config"
"github.com/siderolabs/talos/pkg/machinery/config/generate/secrets"
"github.com/truecharts/private/clustertool/pkg/fluxhandler"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/private/clustertool/pkg/initfiles"
"github.com/truecharts/public/clustertool/pkg/fluxhandler"
"github.com/truecharts/public/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/initfiles"
"gopkg.in/yaml.v3"
)
+2 -2
View File
@@ -1,8 +1,8 @@
package gencmd
import (
"github.com/truecharts/private/clustertool/embed"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/embed"
"github.com/truecharts/public/clustertool/pkg/helper"
)
func GenHealth(node string) string {
+2 -2
View File
@@ -1,8 +1,8 @@
package gencmd
import (
"github.com/truecharts/private/clustertool/embed"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/embed"
"github.com/truecharts/public/clustertool/pkg/helper"
)
func GenKubeConfig(node string) string {
+2 -2
View File
@@ -9,8 +9,8 @@ import (
talhelperCfg "github.com/budimanjojo/talhelper/v3/pkg/config"
"github.com/budimanjojo/talhelper/v3/pkg/generate"
"github.com/truecharts/private/clustertool/embed"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/embed"
"github.com/truecharts/public/clustertool/pkg/helper"
)
func GenReset(node string, extraFlags []string) []string {
+2 -2
View File
@@ -9,8 +9,8 @@ import (
talhelperCfg "github.com/budimanjojo/talhelper/v3/pkg/config"
"github.com/budimanjojo/talhelper/v3/pkg/generate"
"github.com/truecharts/private/clustertool/embed"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/embed"
"github.com/truecharts/public/clustertool/pkg/helper"
)
func GenUpgrade(node string, extraFlags []string) []string {
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"strings"
"github.com/rs/zerolog/log"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/helper"
)
func LoadTalEnv() error {
+2 -2
View File
@@ -18,8 +18,8 @@ import (
age "filippo.io/age"
talhelperCfg "github.com/budimanjojo/talhelper/v3/pkg/config"
"github.com/invopop/jsonschema"
"github.com/truecharts/private/clustertool/pkg/fluxhandler"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/fluxhandler"
"github.com/truecharts/public/clustertool/pkg/helper"
)
func InitFiles() error {
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"github.com/go-logr/logr"
"github.com/go-logr/zapr"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/helper"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"strings"
"github.com/rs/zerolog/log"
"github.com/truecharts/private/clustertool/embed"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/embed"
"github.com/truecharts/public/clustertool/pkg/helper"
)
func baseStatusCMD(node string) []string {
+2 -2
View File
@@ -10,8 +10,8 @@ import (
"strings"
"github.com/rs/zerolog/log"
"github.com/truecharts/private/clustertool/pkg/fluxhandler"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/fluxhandler"
"github.com/truecharts/public/clustertool/pkg/helper"
"gopkg.in/yaml.v3"
)
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"regexp"
"github.com/rs/zerolog/log"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/helper"
"sigs.k8s.io/yaml"
)
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"github.com/getsops/sops/v3/decrypt"
"github.com/rs/zerolog/log"
"github.com/truecharts/private/clustertool/pkg/initfiles"
"github.com/truecharts/public/clustertool/pkg/initfiles"
)
// Custom error type for MAC failures
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"regexp"
"github.com/rs/zerolog/log"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/helper"
)
// EncryptAllFiles encrypts all unencrypted files as specified in the .sops.yaml configuration.
+1 -1
View File
@@ -14,7 +14,7 @@ import (
"github.com/getsops/sops/v3/keys"
"github.com/getsops/sops/v3/keyservice"
"github.com/getsops/sops/v3/version"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/helper"
)
var encrConfig *EncryptionConfig
@@ -5,7 +5,7 @@ import (
"github.com/rs/zerolog/log"
"github.com/truecharts/private/clustertool/pkg/helper"
"github.com/truecharts/public/clustertool/pkg/helper"
"gopkg.in/yaml.v3"
)