> ## Documentation Index
> Fetch the complete documentation index at: https://cdktn.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Go: Aspects

> CDKTN Core API Reference for Aspects in Go.

Aspects can be applied to CDK tree scopes and can operate on the tree before synthesis.

## Methods <a name="Methods" id="Methods" />

| **Name**                                          | **Description**                                      |
| ------------------------------------------------- | ---------------------------------------------------- |
| <code><a href="#cdktn.Aspects.add">Add</a></code> | Adds an aspect to apply this scope before synthesis. |

***

### `Add` <a name="Add" id="cdktn.Aspects.add" />

```go theme={null}
func Add(aspect IAspect)
```

Adds an aspect to apply this scope before synthesis.

#### `aspect`<sup>Required</sup> <a name="aspect" id="cdktn.Aspects.add.parameter.aspect" />

* *Type:* <a href="#cdktn.IAspect">IAspect</a>

The aspect to add.

***

## Static Functions <a name="Static Functions" id="Static Functions" />

| **Name**                                        | **Description**                                                 |
| ----------------------------------------------- | --------------------------------------------------------------- |
| <code><a href="#cdktn.Aspects.of">Of</a></code> | Returns the `Aspects` object associated with a construct scope. |

***

### `Of` <a name="Of" id="cdktn.Aspects.of" />

```go theme={null}
import "github.com/open-constructs/cdk-terrain-go/cdktn"

cdktn.Aspects_Of(scope IConstruct) Aspects
```

Returns the `Aspects` object associated with a construct scope.

#### `scope`<sup>Required</sup> <a name="scope" id="cdktn.Aspects.of.parameter.scope" />

* *Type:* github.com/aws/constructs-go/constructs/v10.IConstruct

The scope for which these aspects will apply.

***

## Properties <a name="Properties" id="Properties" />

| **Name**                                                   | **Type**                                               | **Description**                                                |
| ---------------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------------------- |
| <code><a href="#cdktn.Aspects.property.all">All</a></code> | <code>\*\[]<a href="#cdktn.IAspect">IAspect</a></code> | The list of aspects which were directly applied on this scope. |

***

### `All`<sup>Required</sup> <a name="All" id="cdktn.Aspects.property.all" />

```go theme={null}
func All() *[]IAspect
```

* *Type:* \*\[]<a href="#cdktn.IAspect">IAspect</a>

The list of aspects which were directly applied on this scope.

***
