Add a couple of Go questions
Also some contribution guidelines.
This commit is contained in:
parent
73ac855c84
commit
aa0b6fa9cc
@ -1 +1,17 @@
|
||||
## How to contribute
|
||||
|
||||
Use pull requests to contribute to the project.
|
||||
|
||||
Stick to the following format:
|
||||
|
||||
<details>
|
||||
<summary>[Question]</summary><br><b>
|
||||
|
||||
[Answer]
|
||||
</b></details>
|
||||
|
||||
## What to avoid
|
||||
|
||||
* Avoid adding installation questions. Those are the worst type of questions...
|
||||
* Don't copy questions and answers from other sources. They probably worked hard for adding them.
|
||||
* If you add new images, make sure they are free and can be used.
|
||||
|
64
README.md
64
README.md
@ -3,7 +3,7 @@
|
||||
|
||||
:information_source: This repository contains interview questions on various DevOps related topics
|
||||
|
||||
:bar_chart: There are currently **409** questions
|
||||
:bar_chart: There are currently **413** questions
|
||||
|
||||
|
||||
:warning: You don't need to know how to answer all the questions in this repo. DevOps is not about knowing all :)
|
||||
@ -2375,6 +2375,68 @@ It looks what unicode value is set at 101 and uses it for converting the integer
|
||||
If you want to get "101" you should use the package "strconv" and replace <code>y = string(x)</code> with <code>y = strconv.Itoa(x)</code>
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What is wrong with the following code?:
|
||||
|
||||
```
|
||||
package main
|
||||
|
||||
func main() {
|
||||
var x = 2
|
||||
var y = 3
|
||||
const someConst = x + y
|
||||
}
|
||||
```
|
||||
</summary><br><b>
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What will be the output of the following block of code?:
|
||||
|
||||
```
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
const (
|
||||
x = iota
|
||||
y = iota
|
||||
)
|
||||
const z = iota
|
||||
|
||||
func main() {
|
||||
fmt.Printf("%v\n", x)
|
||||
fmt.Printf("%v\n", y)
|
||||
fmt.Printf("%v\n", z)
|
||||
}
|
||||
```
|
||||
</summary><br><b>
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What _ is used for in Go?</summary><br><b>
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What will be the output of the following block of code?:
|
||||
|
||||
```
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
const (
|
||||
_ = iota + 3
|
||||
x
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Printf("%v\n", x)
|
||||
}
|
||||
```
|
||||
</summary><br><b>
|
||||
</b></details>
|
||||
|
||||
## Mongo
|
||||
|
||||
<a name="mongo-beginner"></a>
|
||||
|
Loading…
Reference in New Issue
Block a user