Skip to content

Commit 2f385e6

Browse files
author
abregman
committed
2 parents f734671 + 8ff61d7 commit 2f385e6

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2532,7 +2532,7 @@ A configuration is a root module along with a tree of child modules that are cal
25322532

25332533
<details>
25342534
<summary>What is HCL?</summary><br><b>
2535-
HCL stands for Hashicorp Conviguration Language. It is the language Hashicorp made to use as the configuration language for a number of its tools, including terraform.
2535+
HCL stands for Hashicorp Configuration Language. It is the language Hashicorp made to use as the configuration language for a number of its tools, including terraform.
25362536
</b></details>
25372537

25382538
<details>
@@ -4772,6 +4772,11 @@ func main() {
47724772
}
47734773
```
47744774
</summary><br><b>
4775+
4776+
Constants in Go can only be declared using constant expressions.
4777+
But `x`, `y` and their sum is variable.
4778+
<br>
4779+
<code>const initializer x + y is not a constant</code>
47754780
</b></details>
47764781

47774782
<details>
@@ -4795,10 +4800,21 @@ func main() {
47954800
}
47964801
```
47974802
</summary><br><b>
4803+
4804+
Go's iota identifier is used in const declarations to simplify definitions of incrementing numbers. Because it can be used in expressions, it provides a generality beyond that of simple enumerations.
4805+
<br>
4806+
`x` and `y` in the first iota group, `z` in the second.
4807+
<br>
4808+
[Iota page in Go Wiki](https://github.com/golang/go/wiki/Iota)
47984809
</b></details>
47994810

48004811
<details>
48014812
<summary>What _ is used for in Go?</summary><br><b>
4813+
4814+
It avoids having to declare all the variables for the returns values.
4815+
It is called the [blank identifier](https://golang.org/doc/effective_go.html#blank).
4816+
<br>
4817+
[answer in SO](https://stackoverflow.com/questions/27764421/what-is-underscore-comma-in-a-go-declaration#answer-27764432)
48024818
</b></details>
48034819

48044820
<details>
@@ -4819,6 +4835,8 @@ func main() {
48194835
}
48204836
```
48214837
</summary><br><b>
4838+
4839+
Since the first iota is declared with the value `3` (` + 3`), the next one has the value `4`
48224840
</b></details>
48234841

48244842
## Mongo

0 commit comments

Comments
 (0)