We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cf14ec commit 8e5c456Copy full SHA for 8e5c456
golang/naming.md
@@ -57,4 +57,5 @@
57
58
- What's in a name? [video](https://youtu.be/sFUSP8Au_PE).
59
- [Variables by ArdanLabs](https://github.com/ardanlabs/gotraining/blob/master/topics/go/language/variables/README.md#links)
60
+- [CodeReviewComments](https://github.com/golang/go/wiki/CodeReviewComments)
61
golang/scan-input.md
@@ -0,0 +1,19 @@
1
+# Scan Input from STDIN
2
+
3
+* Taking in input from command line
4
5
+```go
6
+var name string
7
+fmt.Scanf("%s", &name)
8
+```
9
10
+**Note**: Above method is super simple, we cannot scan lines using above.
11
12
+* Scan lines
13
14
15
+scanner := bufio.NewScanner(os.Stdin)
16
+scanner.Scan()
17
+line := scanner.Text()
18
+fmt.Println(line)
19
golang/scan_input.ipynb
0 commit comments