github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/actor/v7pushaction/handle_default_route_override.go (about)

     1  package v7pushaction
     2  
     3  import (
     4  	"code.cloudfoundry.org/cli/util/manifestparser"
     5  )
     6  
     7  func HandleDefaultRouteOverride(manifest manifestparser.Manifest, overrides FlagOverrides) (manifestparser.Manifest, error) {
     8  	for i := range manifest.Applications {
     9  		if manifest.Applications[i].RandomRoute || manifest.Applications[i].NoRoute {
    10  			continue
    11  		}
    12  		manifest.Applications[i].DefaultRoute = true
    13  	}
    14  
    15  	return manifest, nil
    16  }