Skip to content

Commit

Permalink
Use the collections package for sets almost everywhere.
Browse files Browse the repository at this point in the history
  • Loading branch information
howbazaar committed May 16, 2018
1 parent 8f8d4ae commit c2d69b7
Show file tree
Hide file tree
Showing 185 changed files with 186 additions and 187 deletions.
2 changes: 1 addition & 1 deletion api/facadeversions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package api_test

import (
"github.com/juju/collections/set"
jc "github.com/juju/testing/checkers"
"github.com/juju/utils/set"
gc "gopkg.in/check.v1"

"github.com/juju/juju/api"
Expand Down
2 changes: 1 addition & 1 deletion api/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"net/url"
"time"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/clock"
"github.com/juju/utils/set"
"github.com/juju/version"
"gopkg.in/juju/names.v2"
"gopkg.in/macaroon-bakery.v1/httpbakery"
Expand Down
2 changes: 1 addition & 1 deletion api/storage/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ package storage_test
import (
"fmt"

"github.com/juju/collections/set"
"github.com/juju/errors"
jc "github.com/juju/testing/checkers"
"github.com/juju/utils/set"
gc "gopkg.in/check.v1"
"gopkg.in/juju/names.v2"

Expand Down
2 changes: 1 addition & 1 deletion apiserver/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import (
"sync"
"time"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/loggo"
jt "github.com/juju/testing"
jc "github.com/juju/testing/checkers"
"github.com/juju/utils"
"github.com/juju/utils/set"
gc "gopkg.in/check.v1"
"gopkg.in/juju/names.v2"
"gopkg.in/macaroon-bakery.v1/httpbakery"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/auditconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ package apiserver_test
import (
"net"

"github.com/juju/collections/set"
"github.com/juju/loggo"
jc "github.com/juju/testing/checkers"
"github.com/juju/utils/set"
gc "gopkg.in/check.v1"

"github.com/juju/juju/apiserver"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/common/firewall/egressaddresswatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package firewall

import (
"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/set"
"gopkg.in/juju/worker.v1"

"github.com/juju/juju/apiserver/params"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/common/networkingcommon/subnets.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"net"
"strings"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/loggo"
"github.com/juju/utils/set"
"gopkg.in/juju/names.v2"

"github.com/juju/juju/apiserver/common"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/common/networkingcommon/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package networkingcommon
import (
"net"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/set"
"gopkg.in/juju/names.v2"

"github.com/juju/juju/apiserver/common"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/agent/provisioner/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ package provisioner
import (
"time"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/loggo"
"github.com/juju/utils/set"
"gopkg.in/juju/names.v2"

"github.com/juju/juju/apiserver/common"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/agent/provisioner/provisioninginfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"sort"
"strings"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/series"
"github.com/juju/utils/set"
"gopkg.in/juju/names.v2"

"github.com/juju/juju/apiserver/common"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package filesystemwatcher

import (
"github.com/juju/collections"
"github.com/juju/collections/set"
"github.com/juju/errors"
"gopkg.in/juju/names.v2"
"gopkg.in/tomb.v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package uniter

import (
"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/set"
"gopkg.in/juju/charm.v6"

"github.com/juju/juju/state"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/agent/uniter/uniter.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"fmt"
"strings"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/loggo"
"gopkg.in/juju/charm.v6"
Expand All @@ -26,7 +27,6 @@ import (
"github.com/juju/juju/state/multiwatcher"
"github.com/juju/juju/state/watcher"
"github.com/juju/juju/status"
"github.com/juju/utils/set"
)

var logger = loggo.GetLogger("juju.apiserver.uniter")
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/client/action/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package action
import (
"time"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/set"
"gopkg.in/juju/names.v2"

"github.com/juju/juju/apiserver/params"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/client/application/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ package application_test
import (
"fmt"

"github.com/juju/collections/set"
"github.com/juju/errors"
jc "github.com/juju/testing/checkers"
"github.com/juju/utils/set"
gc "gopkg.in/check.v1"
"gopkg.in/juju/charm.v6"
"gopkg.in/juju/charmrepo.v2"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/client/application/mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"strings"
"sync"

"github.com/juju/collections/set"
"github.com/juju/errors"
jtesting "github.com/juju/testing"
"github.com/juju/utils/set"
"gopkg.in/juju/charm.v6"
"gopkg.in/juju/names.v2"
"gopkg.in/macaroon.v1"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/client/applicationoffers/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"fmt"
"sort"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/set"
"gopkg.in/juju/names.v2"

"github.com/juju/juju/apiserver/common"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/client/charms/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package charms

import (
"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/set"
"gopkg.in/juju/charm.v6"
"gopkg.in/juju/charm.v6/resource"
names "gopkg.in/juju/names.v2"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/client/client/instanceconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package client
import (
"fmt"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/set"

"github.com/juju/juju/api"
"github.com/juju/juju/apiserver/common"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/client/client/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"sort"
"strings"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/set"
"gopkg.in/juju/charm.v6"
"gopkg.in/juju/names.v2"

Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/client/keymanager/keymanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"fmt"
"strings"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/loggo"
"github.com/juju/utils"
"github.com/juju/utils/set"
"github.com/juju/utils/ssh"
"gopkg.in/juju/names.v2"

Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/client/storage/poollist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package storage_test
import (
"fmt"

"github.com/juju/collections/set"
jc "github.com/juju/testing/checkers"
"github.com/juju/utils/set"
gc "gopkg.in/check.v1"

apiserverstorage "github.com/juju/juju/apiserver/facades/client/storage"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/client/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
package storage

import (
"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/set"
"gopkg.in/juju/names.v2"

"github.com/juju/juju/apiserver/common"
Expand Down
4 changes: 2 additions & 2 deletions apiserver/facades/client/subnets/subnets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
package subnets_test

import (
"github.com/juju/collections/set"
"github.com/juju/errors"
jc "github.com/juju/testing/checkers"
"github.com/juju/utils/set"
gc "gopkg.in/check.v1"
"gopkg.in/juju/names.v2"

Expand Down Expand Up @@ -315,7 +315,7 @@ func (s *SubnetsSuite) TestAddSubnetsParamsCombinations(c *gc.C) {
apiservertesting.BackingInstance.SetUp(c, apiservertesting.StubNetworkingEnvironName, apiservertesting.WithZones, apiservertesting.WithSpaces, apiservertesting.WithSubnets)

args := params.AddSubnetsParams{Subnets: []params.AddSubnetParams{{
// nothing set; early exit: no calls
// nothing set; early exit: no calls
}, {
// neither tag nor id set: the rest is ignored; same as above
SpaceTag: "any",
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/controller/firewaller/mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ package firewaller_test
import (
"sync"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/testing"
"github.com/juju/utils/set"
"gopkg.in/juju/names.v2"
"gopkg.in/macaroon.v1"
"gopkg.in/tomb.v1"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/controller/migrationmaster/facade.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ package migrationmaster
import (
"encoding/json"

"github.com/juju/collections/set"
"github.com/juju/description"
"github.com/juju/errors"
"github.com/juju/naturalsort"
"github.com/juju/utils/set"
"github.com/juju/version"
"gopkg.in/juju/names.v2"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package migrationtarget
import (
"time"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/set"
"gopkg.in/juju/names.v2"

"github.com/juju/juju/apiserver/common"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/observer/auditfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"fmt"
"sync"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/set"

"github.com/juju/juju/controller"
"github.com/juju/juju/core/auditlog"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/observer/auditfilter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ package observer_test
import (
"strings"

"github.com/juju/collections/set"
"github.com/juju/testing"
jc "github.com/juju/testing/checkers"
"github.com/juju/utils/set"
gc "gopkg.in/check.v1"

"github.com/juju/juju/apiserver/observer"
Expand Down
2 changes: 1 addition & 1 deletion apiserver/restrict_anonymous.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package apiserver
import (
"fmt"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/set"
)

// The anonymousFacadeNames are the root names that can be accessed
Expand Down
2 changes: 1 addition & 1 deletion apiserver/restrict_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package apiserver
import (
"fmt"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/set"
)

// The controllerFacadeNames are the root names that can be accessed
Expand Down
2 changes: 1 addition & 1 deletion apiserver/restrict_migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package apiserver

import (
"github.com/juju/utils/set"
"github.com/juju/collections/set"

"github.com/juju/juju/apiserver/params"
)
Expand Down
2 changes: 1 addition & 1 deletion apiserver/restrict_restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package apiserver

import (
"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/utils/set"
)

var aboutToRestoreError = errors.New("juju restore is in progress - functionality is limited to avoid data loss")
Expand Down
2 changes: 1 addition & 1 deletion apiserver/restrict_upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package apiserver

import (
"github.com/juju/utils/set"
"github.com/juju/collections/set"

"github.com/juju/juju/apiserver/params"
)
Expand Down
2 changes: 1 addition & 1 deletion apiserver/testing/stub_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"strconv"
"strings"

"github.com/juju/collections/set"
"github.com/juju/testing"
"github.com/juju/utils"
"github.com/juju/utils/set"
gc "gopkg.in/check.v1"
names "gopkg.in/juju/names.v2"

Expand Down
2 changes: 1 addition & 1 deletion cloudconfig/containerinit/container_userdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"path/filepath"
"strings"

"github.com/juju/collections/set"
"github.com/juju/errors"
"github.com/juju/loggo"
"github.com/juju/utils/set"

"github.com/juju/juju/cloudconfig"
"github.com/juju/juju/cloudconfig/cloudinit"
Expand Down
Loading

0 comments on commit c2d69b7

Please sign in to comment.