Improve documentation and golint compliance of registry package

* Add godoc documentation where it was missing

* Change identifier names that don't match Go style, such as INDEX_NAME

* Rename RegistryInfo to PingResult, which more accurately describes
  what this structure is for. It also has the benefit of making the name
  not stutter if used outside the package.

Updates #14756

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
Aaron Lehmann 2015-07-21 12:40:36 -07:00
parent a246ab0a5e
commit 52136ab008
11 changed files with 231 additions and 142 deletions

View file

@ -145,7 +145,7 @@ func makeURL(req string) string {
return testHTTPServer.URL + req
}
func makeHttpsURL(req string) string {
func makeHTTPSURL(req string) string {
return testHTTPSServer.URL + req
}
@ -156,16 +156,16 @@ func makeIndex(req string) *IndexInfo {
return index
}
func makeHttpsIndex(req string) *IndexInfo {
func makeHTTPSIndex(req string) *IndexInfo {
index := &IndexInfo{
Name: makeHttpsURL(req),
Name: makeHTTPSURL(req),
}
return index
}
func makePublicIndex() *IndexInfo {
index := &IndexInfo{
Name: INDEXSERVER,
Name: IndexServer,
Secure: true,
Official: true,
}
@ -468,7 +468,7 @@ func TestPing(t *testing.T) {
* WARNING: Don't push on the repos uncommented, it'll block the tests
*
func TestWait(t *testing.T) {
logrus.Println("Test HTTP server ready and waiting:", testHttpServer.URL)
logrus.Println("Test HTTP server ready and waiting:", testHTTPServer.URL)
c := make(chan int)
<-c
}