fixed imports

This commit is contained in:
jandre 2023-03-21 10:36:39 +01:00
parent 36cf68b74b
commit 9f40d2eb6c
2 changed files with 3 additions and 4 deletions

View File

@ -3,13 +3,10 @@ package controllers
import ( import (
"bufio" "bufio"
"encoding/json" "encoding/json"
"fmt"
formolv1alpha1 "github.com/desmo999r/formol/api/v1alpha1" formolv1alpha1 "github.com/desmo999r/formol/api/v1alpha1"
"io" "io"
"os" "os"
"os/exec" "os/exec"
"sigs.k8s.io/controller-runtime/pkg/client"
"strings"
) )
type BackupResult struct { type BackupResult struct {

View File

@ -4,6 +4,7 @@ import (
"bufio" "bufio"
"bytes" "bytes"
"context" "context"
"fmt"
formolv1alpha1 "github.com/desmo999r/formol/api/v1alpha1" formolv1alpha1 "github.com/desmo999r/formol/api/v1alpha1"
"github.com/go-logr/logr" "github.com/go-logr/logr"
"io" "io"
@ -17,6 +18,7 @@ import (
"regexp" "regexp"
"sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client"
"strconv" "strconv"
"strings"
) )
type Session struct { type Session struct {
@ -33,7 +35,7 @@ const (
func (s Session) setResticEnv(backupConf formolv1alpha1.BackupConfiguration) error { func (s Session) setResticEnv(backupConf formolv1alpha1.BackupConfiguration) error {
repo := formolv1alpha1.Repo{} repo := formolv1alpha1.Repo{}
if err := s.Get(r.Context, client.ObjectKey{ if err := s.Get(s.Context, client.ObjectKey{
Namespace: backupConf.Namespace, Namespace: backupConf.Namespace,
Name: backupConf.Spec.Repository, Name: backupConf.Spec.Repository,
}, &repo); err != nil { }, &repo); err != nil {