(path string)
| 37 | } |
| 38 | |
| 39 | func newForwardEndpoint(path string) (*forwardEndpoint, error) { |
| 40 | url, err := url.Parse(path) |
| 41 | if err != nil { |
| 42 | return nil, fmt.Errorf("Could not parse route URL: %s", err) |
| 43 | } |
| 44 | f := forwardEndpoint(*url) |
| 45 | return &f, nil |
| 46 | } |
| 47 | |
| 48 | func (ep forwardEndpoint) String() string { |
| 49 | return "forward to " + ep.Scheme + "://" + ep.Host + ep.Path |