buildResourceURL constructs a URL from externalURL and resource name.
(resourceName string)
| 504 | |
| 505 | // buildResourceURL constructs a URL from externalURL and resource name. |
| 506 | func (s *Server) buildResourceURL(resourceName string) string { |
| 507 | base := strings.TrimRight(s.profile.ExternalURL, "/") |
| 508 | if base == "" { |
| 509 | return resourceName |
| 510 | } |
| 511 | return base + "/" + resourceName |
| 512 | } |
| 513 | |
| 514 | // formatChangeOutput produces a text header + JSON body. |
| 515 | func formatChangeOutput(output *ChangeOutput, warnings []string) string { |