registry: remove intermediate vars in mock
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
550e628f05
commit
43740ab642
1 changed files with 5 additions and 10 deletions
|
@ -76,35 +76,30 @@ func makeHTTPSURL(req string) string {
|
|||
}
|
||||
|
||||
func makeIndex(req string) *registry.IndexInfo {
|
||||
index := ®istry.IndexInfo{
|
||||
return ®istry.IndexInfo{
|
||||
Name: makeURL(req),
|
||||
}
|
||||
return index
|
||||
}
|
||||
|
||||
func makeHTTPSIndex(req string) *registry.IndexInfo {
|
||||
index := ®istry.IndexInfo{
|
||||
return ®istry.IndexInfo{
|
||||
Name: makeHTTPSURL(req),
|
||||
}
|
||||
return index
|
||||
}
|
||||
|
||||
func makePublicIndex() *registry.IndexInfo {
|
||||
index := ®istry.IndexInfo{
|
||||
return ®istry.IndexInfo{
|
||||
Name: IndexServer,
|
||||
Secure: true,
|
||||
Official: true,
|
||||
}
|
||||
return index
|
||||
}
|
||||
|
||||
func makeServiceConfig(mirrors []string, insecureRegistries []string) (*serviceConfig, error) {
|
||||
options := ServiceOptions{
|
||||
return newServiceConfig(ServiceOptions{
|
||||
Mirrors: mirrors,
|
||||
InsecureRegistries: insecureRegistries,
|
||||
}
|
||||
|
||||
return newServiceConfig(options)
|
||||
})
|
||||
}
|
||||
|
||||
func writeHeaders(w http.ResponseWriter) {
|
||||
|
|
Loading…
Reference in a new issue