As agreed online: it's about consistency, and only these 2 files in the
whole codebase import a single package inline, rather than in a block.
There are plenty of examples of single import blocks.
This fixes several things across the codebase:
* gocheck is imported as gc in every file
* testing/checkers is imported as jc in every file
* imports are properly grouped as standard, 3rd party and juju-core
Affected files (+711, -597 lines):
A [revision details]
M cert/cert_test.go
M cmd/builddb/main.go
M cmd/charmload/main.go
M cmd/juju/addmachine_test.go
M cmd/juju/addrelation_test.go
M cmd/juju/addunit_test.go
M cmd/juju/cmd_test.go
M cmd/juju/constraints_test.go
M cmd/juju/deploy_test.go
M cmd/juju/destroymachine_test.go
M cmd/juju/destroyrelation_test.go
M cmd/juju/destroyservice_test.go
M cmd/juju/destroyunit_test.go
M cmd/juju/endpoint.go
M cmd/juju/expose_test.go
M cmd/juju/helptool_test.go
M cmd/juju/plugin_test.go
M cmd/juju/publish_test.go
M cmd/juju/resolved_test.go
M cmd/juju/scp_test.go
M cmd/juju/ssh_test.go
M cmd/juju/switch.go
M cmd/juju/switch_test.go
M cmd/juju/unexpose_test.go
M cmd/juju/upgradecharm_test.go
M cmd/jujud/main.go
M cmd/jujud/main_test.go
M cmd/plugins/juju-metadata/metadataplugin_test.go
M environs/cloudinit/suite_test.go
M environs/config/home_test.go
M environs/instances/image_test.go
M environs/jujutest/jujutest_test.go
M environs/jujutest/livetests.go
M environs/jujutest/metadata_test.go
M environs/jujutest/tests.go
M environs/localstorage/backend_test.go
M environs/simplestreams/datasource.go
M environs/simplestreams/decode.go
M environs/storage.go
M environs/testing/tools.go
M environs/tools/simplestreams.go
M environs/tools/testing/testing.go
M instance/instance_test.go
M juju/conn_test.go
M juju/testing/repo.go
M log/syslog/config_test.go
M names/environ.go
M names/user.go
M provider/azure/environprovider.go
M provider/azure/storage.go
M provider/ec2/config.go
M provider/ec2/export_test.go
M provider/ec2/instancetype.go
M provider/ec2/suite_test.go
M provider/openstack/config.go
M provider/openstack/live_test.go
M provider/provider_test.go
M rpc/jsoncodec/codec.go
M rpc/jsoncodec/codec_test.go
M rpc/jsoncodec/conn.go
M state/api/agent/state.go
M state/api/apiclient.go
M state/api/params/params.go
M state/api/params/params_test.go
M state/api/watcher/watcher.go
M state/apiserver/admin.go
M state/apiserver/apiserver.go
M state/apiserver/client/api_test.go
M state/apiserver/client/client_test.go
M state/apiserver/common/resource.go
M state/apiserver/login_test.go
M state/apiserver/utils.go
M state/charm_test.go
M state/initialize_test.go
M state/machine_test.go
M state/multiwatcher/multiwatcher.go
M state/multiwatcher/multiwatcher_internal_test.go
M state/presence/presence.go
M state/presence/presence_test.go
M state/relation.go
M state/relation_test.go
M state/relationunit.go
M state/service_test.go
M state/settings_test.go
M state/statecmd/addrelation_test.go
M state/statecmd/destroyrelation_test.go
M state/statecmd/destroyservice_test.go
M state/statecmd/expose_test.go
M state/statecmd/unexpose_test.go
M state/unit.go
M state/unit_test.go
M state/watcher/helpers_test.go
M state/watcher/watcher.go
M state/watcher/watcher_test.go
M store/mgo_test.go
M testing/checkers/bool.go
M testing/checkers/bool_test.go
M testing/checkers/checker.go
M testing/checkers/file.go
M testing/checkers/file_test.go
M testing/checkers/relop.go
M testing/checkers/relop_test.go
M testing/checkers/set_test.go
M testing/cmd.go
M testing/environ.go
M testing/git.go
M testing/http.go
M testing/instance.go
M testing/log_test.go
M testing/mgo.go
M tools/list.go
M utils/attempt_test.go
M utils/fslock/fslock_test.go
M utils/set/strings_test.go
M utils/uuid_test.go
M worker/deployer/simple_test.go
M worker/firewaller/firewaller.go
M worker/provisioner/provisioner_test.go
M worker/resumer/resumer.go
M worker/resumer/resumer_test.go
M worker/uniter/charm/charm_test.go
M worker/uniter/jujuc/ports_test.go
M worker/uniter/jujuc/server_test.go
M worker/uniter/relation/relation_test.go
M worker/uniter/relationer_test.go
Reviewers: mp+185519_ code.launchpad. net, rog,
https:/ /codereview. appspot. com/13606045/ diff/1/ names/environ. go
File names/environ.go (left):
https:/ /codereview. appspot. com/13606045/ diff/1/ names/environ. go#oldcode6
names/environ.go:6: import "strings"
On 2013/09/13 15:06:55, rog wrote:
> I think this is still fine for a single import.
As agreed online: it's about consistency, and only these 2 files in the
whole codebase import a single package inline, rather than in a block.
There are plenty of examples of single import blocks.
https:/ /codereview. appspot. com/13606045/ diff/1/ names/user. go
File names/user.go (left):
https:/ /codereview. appspot. com/13606045/ diff/1/ names/user. go#oldcode6
names/user.go:6: import "strings"
On 2013/09/13 15:06:55, rog wrote:
> ditto
Same answer as above.
Description:
various: gocheck, checkers, imports fixes
This fixes several things across the codebase:
* gocheck is imported as gc in every file
* testing/checkers is imported as jc in every file
* imports are properly grouped as standard, 3rd party and juju-core
https:/ /code.launchpad .net/~dimitern/ juju-core/ 137-fix- state-imports/ +merge/ 185519
Requires: /code.launchpad .net/~dimitern/ juju-core/ 136-params- error-code- helpers/ +merge/ 185461
https:/
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/13606045/
Affected files (+711, -597 lines): main.go addmachine_ test.go addrelation_ test.go addunit_ test.go cmd_test. go constraints_ test.go deploy_ test.go destroymachine_ test.go destroyrelation _test.go destroyservice_ test.go destroyunit_ test.go endpoint. go expose_ test.go helptool_ test.go plugin_ test.go publish_ test.go resolved_ test.go scp_test. go ssh_test. go switch_ test.go unexpose_ test.go upgradecharm_ test.go main_test. go juju-metadata/ metadataplugin_ test.go cloudinit/ suite_test. go config/ home_test. go instances/ image_test. go jujutest/ jujutest_ test.go jujutest/ livetests. go jujutest/ metadata_ test.go jujutest/ tests.go localstorage/ backend_ test.go simplestreams/ datasource. go simplestreams/ decode. go testing/ tools.go tools/simplestr eams.go tools/testing/ testing. go instance_ test.go repo.go config_ test.go azure/environpr ovider. go azure/storage. go ec2/config. go ec2/export_ test.go ec2/instancetyp e.go ec2/suite_ test.go openstack/ config. go openstack/ live_test. go provider_ test.go codec.go codec_test. go conn.go agent/state. go apiclient. go params/ params. go params/ params_ test.go watcher/ watcher. go /admin. go /apiserver. go /client/ api_test. go /client/ client_ test.go /common/ resource. go /login_ test.go /utils. go e_test. go test.go her/multiwatche r.go her/multiwatche r_internal_ test.go presence. go presence_ test.go test.go nit.go test.go test.go addrelation_ test.go destroyrelation _test.go destroyservice_ test.go expose_ test.go unexpose_ test.go helpers_ test.go watcher. go watcher_ test.go checkers/ bool.go checkers/ bool_test. go checkers/ checker. go checkers/ file.go checkers/ file_test. go checkers/ relop.go checkers/ relop_test. go checkers/ set_test. go test.go fslock_ test.go strings_ test.go deployer/ simple_ test.go firewaller/ firewaller. go provisioner/ provisioner_ test.go resumer/ resumer. go resumer/ resumer_ test.go uniter/ charm/charm_ test.go uniter/ jujuc/ports_ test.go uniter/ jujuc/server_ test.go uniter/ relation/ relation_ test.go uniter/ relationer_ test.go
A [revision details]
M cert/cert_test.go
M cmd/builddb/main.go
M cmd/charmload/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/juju/switch.go
M cmd/juju/
M cmd/juju/
M cmd/juju/
M cmd/jujud/main.go
M cmd/jujud/
M cmd/plugins/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/storage.go
M environs/
M environs/
M environs/
M instance/
M juju/conn_test.go
M juju/testing/
M log/syslog/
M names/environ.go
M names/user.go
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M provider/
M rpc/jsoncodec/
M rpc/jsoncodec/
M rpc/jsoncodec/
M state/api/
M state/api/
M state/api/
M state/api/
M state/api/
M state/apiserver
M state/apiserver
M state/apiserver
M state/apiserver
M state/apiserver
M state/apiserver
M state/apiserver
M state/charm_test.go
M state/initializ
M state/machine_
M state/multiwatc
M state/multiwatc
M state/presence/
M state/presence/
M state/relation.go
M state/relation_
M state/relationu
M state/service_
M state/settings_
M state/statecmd/
M state/statecmd/
M state/statecmd/
M state/statecmd/
M state/statecmd/
M state/unit.go
M state/unit_test.go
M state/watcher/
M state/watcher/
M state/watcher/
M store/mgo_test.go
M testing/
M testing/
M testing/
M testing/
M testing/
M testing/
M testing/
M testing/
M testing/cmd.go
M testing/environ.go
M testing/git.go
M testing/http.go
M testing/instance.go
M testing/log_test.go
M testing/mgo.go
M tools/list.go
M utils/attempt_
M utils/fslock/
M utils/set/
M utils/uuid_test.go
M worker/
M worker/
M worker/
M worker/
M worker/
M worker/
M worker/
M worker/
M worker/
M worker/