# Extract Constant dialog

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/go/llms.txt).

> **TL;DR**
> `Refactor | Extract Constant`
>
>
>
> [Introduce Constant… shortcut](https://www.jetbrains.com/help/go/llms-keymap-index.md "IntroduceConstant")

| Item | Description |
| --- | --- |
| Name | Enter the name of the new constant. |
| Replace all occurrences | Select this option to automatically replace every occurrence of the selected expression (if the expression appears more than once in the method).  |

## See also

### External Links

[https://blog.jetbrains.com/go/2018/10/26/refactorings-in-goland-extract-and-inline/](https://blog.jetbrains.com/go/2018/10/26/refactorings-in-goland-extract-and-inline/)

