Skip to content

Commit

Permalink
Add a couple of Go questions
Browse files Browse the repository at this point in the history
Also some contribution guidelines.
  • Loading branch information
abregman committed Oct 23, 2019
1 parent 73ac855 commit aa0b6fa
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 1 deletion.
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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 changes: 63 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

:information_source: &nbsp;This repository contains interview questions on various DevOps related topics

:bar_chart: &nbsp;There are currently **409** questions
:bar_chart: &nbsp;There are currently **413** questions


:warning: &nbsp;You don't need to know how to answer all the questions in this repo. DevOps is not about knowing all :)
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit aa0b6fa

Please sign in to comment.