You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-1Lines changed: 19 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2532,7 +2532,7 @@ A configuration is a root module along with a tree of child modules that are cal
2532
2532
2533
2533
<details>
2534
2534
<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.
2536
2536
</b></details>
2537
2537
2538
2538
<details>
@@ -4772,6 +4772,11 @@ func main() {
4772
4772
}
4773
4773
```
4774
4774
</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>
4775
4780
</b></details>
4776
4781
4777
4782
<details>
@@ -4795,10 +4800,21 @@ func main() {
4795
4800
}
4796
4801
```
4797
4802
</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)
4798
4809
</b></details>
4799
4810
4800
4811
<details>
4801
4812
<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)
4802
4818
</b></details>
4803
4819
4804
4820
<details>
@@ -4819,6 +4835,8 @@ func main() {
4819
4835
}
4820
4836
```
4821
4837
</summary><br><b>
4838
+
4839
+
Since the first iota is declared with the value `3` (` + 3`), the next one has the value `4`
0 commit comments