# ResourceUrlsEditor.AddForEndpoint

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Defined on: [ResourceUrlsEditor](/reference/api/go/aspire.hosting/resourceurlseditor.md)
- Version: `17.0.0`
- Kind: `method`

Adds a displayed URL for a specific endpoint.

## Definition

```go
type ResourceUrlsEditor interface {
    // ... omitted for brevity
    AddForEndpoint(
        endpoint EndpointReference,
        url any,
        options ...*AddForEndpointOptions,
    ) error
}
```

## Signature

```go
AddForEndpoint(
    endpoint EndpointReference,
    url any,
    options ...*AddForEndpointOptions,
) error
```

## Parameters

- `endpoint` ([`EndpointReference`](/reference/api/go/aspire.hosting/endpointreference.md)) -- The endpoint the URL is associated with.
- `url` (`any`) -- The URL to add, specified as a string or reference expression.
- `options` (`...*AddForEndpointOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*AddForEndpointOptions` argument.

- `DisplayText` (`*string`) -- The optional display text to show for the URL.

## Returns

`error`

Returns `error`.

## Defined on

- [ResourceUrlsEditor](/reference/api/go/aspire.hosting/resourceurlseditor.md) -- `handle`
