List of Go live templates
Use live templates to insert common constructs into your code, such as loops, conditions, declarations, or print statements.
This table summarizes the live templates that you can use with your Go code.
Abbreviation | Description | Template text | Can be applied in |
---|---|---|---|
| Variable declaration := |
| Statement |
| Benchmark |
| File |
| Constants declaration |
| File Statement |
| If error |
| Statement |
| Indexed for loop |
| Statement |
| For range loop |
| Statement |
| Fuzzing |
| File |
| Imports declaration |
| File |
| Init function |
| File |
| Iota constant declaration |
| File Statement |
| Main function |
| File |
| Map type |
| Type |
| Method |
| File |
| Package declaration |
| File |
| printf |
| Statement |
| Test |
| File |
| Types declaration |
| File Statement |
| Variables declaration |
| File Statement |
Thanks for your feedback!
Was this page helpful?