Skip to content

Commit ec1623d

Browse files
committed
first commit
0 parents  commit ec1623d

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# notes

golang/gofacts.ipynb

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# GoFacts"
8+
]
9+
},
10+
{
11+
"cell_type": "markdown",
12+
"metadata": {},
13+
"source": [
14+
"- In Go, a name is exported if it begins with a capital letter. For example, Pizza is an exported name, as is Pi, which is exported from the math package. [Ref](https://tour.golang.org/basics/3)\n",
15+
"\n",
16+
"- Go's return statements can be named. Also called as Naked returns.\n",
17+
"\n",
18+
"```go\n",
19+
"func abc(val int) (x, y int) {\n",
20+
" return\n",
21+
"}\n",
22+
"```\n",
23+
"\n",
24+
"- `var` is used to declare variables in golang\n",
25+
"```go\n",
26+
"var a, b, c int\n",
27+
"```\n",
28+
"\n",
29+
"- Outside a function, every statement begins with a keyword (`var`, `func`, and so on) and so the `:=` construct is not available.\n",
30+
"\n",
31+
"- Constants are declared like variables, but with the const keyword, cannot be declared using the `:=` syntax."
32+
]
33+
},
34+
{
35+
"cell_type": "code",
36+
"execution_count": null,
37+
"metadata": {
38+
"collapsed": true
39+
},
40+
"outputs": [],
41+
"source": []
42+
}
43+
],
44+
"metadata": {
45+
"kernelspec": {
46+
"display_name": "Golang",
47+
"language": "go",
48+
"name": "gophernotes"
49+
},
50+
"language_info": {
51+
"name": "go"
52+
}
53+
},
54+
"nbformat": 4,
55+
"nbformat_minor": 0
56+
}

0 commit comments

Comments
 (0)