dotcloud/docker

View on GitHub
registry/service_v2.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method Service.lookupV2Endpoints has 61 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (s *Service) lookupV2Endpoints(hostname string) (endpoints []APIEndpoint, err error) {
    ana := s.config.allowNondistributableArtifacts(hostname)

    if hostname == DefaultNamespace || hostname == IndexHostname {
        for _, mirror := range s.config.Mirrors {
Severity: Minor
Found in registry/service_v2.go - About 1 hr to fix

    Method Service.lookupV2Endpoints has 5 return statements (exceeds 4 allowed).
    Open

    func (s *Service) lookupV2Endpoints(hostname string) (endpoints []APIEndpoint, err error) {
        ana := s.config.allowNondistributableArtifacts(hostname)
    
        if hostname == DefaultNamespace || hostname == IndexHostname {
            for _, mirror := range s.config.Mirrors {
    Severity: Major
    Found in registry/service_v2.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status