Run goimports

This commit is contained in:
Haiyan Meng
2019-12-17 12:31:23 -08:00
parent bef157d6b3
commit a35f002139
3 changed files with 6 additions and 4 deletions

View File

@@ -8,9 +8,10 @@ import (
"fmt" "fmt"
"log" "log"
"os" "os"
"sigs.k8s.io/kustomize/api/internal/crawl/index"
"sync" "sync"
"sigs.k8s.io/kustomize/api/internal/crawl/index"
_ "github.com/gomodule/redigo/redis" _ "github.com/gomodule/redigo/redis"
"sigs.k8s.io/kustomize/api/internal/crawl/doc" "sigs.k8s.io/kustomize/api/internal/crawl/doc"
@@ -138,7 +139,7 @@ func doCrawl(ctx context.Context, docsPtr *CrawlSeed, crawlers []Crawler, conv C
FetchDocumentErrCount++ FetchDocumentErrCount++
// delete the document from the index // delete the document from the index
cdoc := &doc.KustomizationDocument{ cdoc := &doc.KustomizationDocument{
Document: *tail, Document: *tail,
} }
seen[cdoc.ID()] = struct{}{} seen[cdoc.ID()] = struct{}{}
if err := indx(cdoc, match, index.Delete); err != nil { if err := indx(cdoc, match, index.Delete); err != nil {

View File

@@ -5,13 +5,14 @@ import (
"errors" "errors"
"fmt" "fmt"
"reflect" "reflect"
"sigs.k8s.io/kustomize/api/internal/crawl/index"
"sort" "sort"
"strings" "strings"
"sync" "sync"
"testing" "testing"
"time" "time"
"sigs.k8s.io/kustomize/api/internal/crawl/index"
"sigs.k8s.io/kustomize/api/internal/crawl/doc" "sigs.k8s.io/kustomize/api/internal/crawl/doc"
"sigs.k8s.io/kustomize/api/konfig" "sigs.k8s.io/kustomize/api/konfig"
) )

View File

@@ -47,7 +47,7 @@ type set map[string]struct{}
func (doc *KustomizationDocument) String() string { func (doc *KustomizationDocument) String() string {
return fmt.Sprintf("%s %s %s %v %v %v len(identifiers):%v len(values):%v", return fmt.Sprintf("%s %s %s %v %v %v len(identifiers):%v len(values):%v",
doc.RepositoryURL, doc.FilePath, doc.DefaultBranch, doc.CreationTime, doc.RepositoryURL, doc.FilePath, doc.DefaultBranch, doc.CreationTime,
doc.IsSame, doc.Kinds, len(doc.Identifiers), len(doc.Values)) doc.IsSame, doc.Kinds, len(doc.Identifiers), len(doc.Values))
} }
// Implements the CrawlerDocument interface. // Implements the CrawlerDocument interface.