fix goimports (#1372)

This commit is contained in:
Rémy Léone 2021-04-03 05:50:28 +02:00 committed by GitHub
parent 0036f0c32b
commit d1e538e2d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 56 additions and 71 deletions

View File

@ -17,6 +17,9 @@ limitations under the License.
package kobject
import (
"path/filepath"
"time"
dockerCliTypes "github.com/docker/cli/cli/compose/types"
"github.com/docker/libcompose/yaml"
deployapi "github.com/openshift/api/apps/v1"
@ -25,8 +28,6 @@ import (
v1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/intstr"
"path/filepath"
"time"
)
// KomposeObject holds the generic struct of Kompose transformation

View File

@ -21,16 +21,11 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
api "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"os"
"path"
"path/filepath"
"reflect"
"sort"
"strconv"
"strings"
"text/template"
@ -39,14 +34,16 @@ import (
"github.com/joho/godotenv"
"github.com/kubernetes/kompose/pkg/kobject"
"github.com/kubernetes/kompose/pkg/transformer"
log "github.com/sirupsen/logrus"
"gopkg.in/yaml.v3"
appsv1 "k8s.io/api/apps/v1"
"sort"
deployapi "github.com/openshift/api/apps/v1"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"gopkg.in/yaml.v3"
appsv1 "k8s.io/api/apps/v1"
api "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
)
/**

View File

@ -17,20 +17,17 @@ limitations under the License.
package kubernetes
import (
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"os"
"path/filepath"
"reflect"
"strconv"
"testing"
"os"
"path/filepath"
"github.com/kubernetes/kompose/pkg/kobject"
"github.com/kubernetes/kompose/pkg/testutils"
"reflect"
"github.com/pkg/errors"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
)
/*

View File

@ -18,36 +18,33 @@ package kubernetes
import (
"fmt"
"github.com/fatih/structs"
"github.com/kubernetes/kompose/pkg/kobject"
"github.com/kubernetes/kompose/pkg/transformer"
deployapi "github.com/openshift/api/apps/v1"
log "github.com/sirupsen/logrus"
"io/ioutil"
api "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/intstr"
"os"
"path"
"path/filepath"
"reflect"
"regexp"
"strconv"
buildapi "github.com/openshift/api/build/v1"
appsv1 "k8s.io/api/apps/v1"
networkingv1 "k8s.io/api/networking/v1"
networkingv1beta1 "k8s.io/api/networking/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sort"
"strconv"
"strings"
"path/filepath"
"github.com/fatih/structs"
"github.com/kubernetes/kompose/pkg/kobject"
"github.com/kubernetes/kompose/pkg/loader/compose"
"github.com/kubernetes/kompose/pkg/transformer"
deployapi "github.com/openshift/api/apps/v1"
buildapi "github.com/openshift/api/build/v1"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"github.com/spf13/cast"
appsv1 "k8s.io/api/apps/v1"
api "k8s.io/api/core/v1"
networkingv1 "k8s.io/api/networking/v1"
networkingv1beta1 "k8s.io/api/networking/v1beta1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/intstr"
)
// Kubernetes implements Transformer interface and represents Kubernetes transformer

View File

@ -19,23 +19,20 @@ package kubernetes
import (
"encoding/json"
"fmt"
appsv1 "k8s.io/api/apps/v1"
networkingv1beta1 "k8s.io/api/networking/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
"reflect"
"strings"
"testing"
"github.com/kubernetes/kompose/pkg/kobject"
"github.com/kubernetes/kompose/pkg/transformer"
deployapi "github.com/openshift/api/apps/v1"
"github.com/pkg/errors"
appsv1 "k8s.io/api/apps/v1"
api "k8s.io/api/core/v1"
"strings"
networkingv1beta1 "k8s.io/api/networking/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
)
func newServiceConfig() kobject.ServiceConfig {

View File

@ -18,27 +18,22 @@ package openshift
import (
"fmt"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/intstr"
"os"
"sort"
"github.com/kubernetes/kompose/pkg/kobject"
"github.com/kubernetes/kompose/pkg/transformer"
"github.com/kubernetes/kompose/pkg/transformer/kubernetes"
log "github.com/sirupsen/logrus"
deployapi "github.com/openshift/api/apps/v1"
buildapi "github.com/openshift/api/build/v1"
imageapi "github.com/openshift/api/image/v1"
routeapi "github.com/openshift/api/route/v1"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
kapi "k8s.io/apimachinery/pkg/apis/meta/v1"
"sort"
"github.com/kubernetes/kompose/pkg/transformer"
"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/intstr"
)
// OpenShift implements Transformer interface and represents OpenShift transformer

View File

@ -17,9 +17,6 @@ limitations under the License.
package openshift
import (
deployapi "github.com/openshift/api/apps/v1"
"k8s.io/apimachinery/pkg/runtime"
"os"
"path/filepath"
"reflect"
@ -29,9 +26,10 @@ import (
"github.com/kubernetes/kompose/pkg/testutils"
"github.com/kubernetes/kompose/pkg/transformer"
"github.com/kubernetes/kompose/pkg/transformer/kubernetes"
deployapi "github.com/openshift/api/apps/v1"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
)
func newServiceConfig() kobject.ServiceConfig {

View File

@ -18,14 +18,15 @@ package docker
import (
"bytes"
dockerlib "github.com/fsouza/go-dockerclient"
"github.com/kubernetes/kompose/pkg/utils/archive"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"io/ioutil"
"os"
"path"
"strings"
dockerlib "github.com/fsouza/go-dockerclient"
"github.com/kubernetes/kompose/pkg/utils/archive"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
)
// Build will provide methods for interaction with API regarding building images

View File

@ -17,8 +17,9 @@ limitations under the License.
package docker
import (
"github.com/fsouza/go-dockerclient"
"os"
docker "github.com/fsouza/go-dockerclient"
)
// Client connects to Docker client on host

View File

@ -18,8 +18,9 @@ package docker
import (
"bytes"
dockerlib "github.com/fsouza/go-dockerclient"
"github.com/novln/docker-parser"
dockerparser "github.com/novln/docker-parser"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
)