Skip to content

Commit 37fb369

Browse files
committed
re-factors
1 parent 2b21ddd commit 37fb369

File tree

12 files changed

+55
-15
lines changed

12 files changed

+55
-15
lines changed

README.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,15 @@ This training kit has been developed for those who already have the basic knowle
44

55
## Table of content
66

7-
* Session 1: Introduction to Go & development environment.
8-
* Session 2: Variables, Types, Pointers and Constants.
9-
* Session 3: Functions.
10-
* Session 4: Branching & Loops.
11-
* Session 5: Maps, Slices.
12-
* Session 6: Methods & Interface.
13-
* Session 7: Concurrency.
14-
* Session 8: Web Application.
15-
* Session 9: Introduction to Martini - Go web framework.
16-
17-
## Author & Contributors
18-
19-
Developed & maintained by author: Ashwin Hegde
20-
21-
Follow me at: [github](https://github.com/hegdeashwin) | [Linkedin](http://in.linkedin.com/in/hegdeashwin) | [Twitter](https://twitter.com/hegdeashwin3)
7+
* Introduction to Go & development environment.
8+
* Session 1: Variables, Types, Pointers and Constants.
9+
* Session 2: Functions.
10+
* Session 3: Branching & Loops.
11+
* Session 4: Maps, Slices.
12+
* Session 5: Methods & Interface.
13+
* Session 6: Concurrency.
14+
15+
## Contributors
2216

2317
We really appreciate all kind of contributions. Special thanks to <a href="//github.com/hegdeashwin/learning-go-lang/graphs/contributors" target="_blank">contributors</a> for using and supporting learning-go-lang.
2418

File renamed without changes.

codes/session-1/helloworld.go

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/**
2+
* Declare the file as main package.
3+
*/
4+
package main
5+
6+
/**
7+
* import format;
8+
*/
9+
import "fmt"
10+
11+
/**
12+
* Main function acts as a single entry point.
13+
*/
14+
func main() {
15+
16+
/**
17+
* Print a message
18+
*/
19+
fmt.Println("Hello World");
20+
21+
/**
22+
* Declare a variable with string type and assign a string value to it;
23+
* Type is optional.
24+
*/
25+
var message string
26+
message = "Welcome to Go World!"
27+
28+
fmt.Println(message);
29+
30+
/**
31+
* Declare multiple variables with integer type and assign a integer values to them;
32+
* Type is optional.
33+
*/
34+
var a, b, c int = 1, 2, 3
35+
36+
fmt.Println(a, b, c);
37+
38+
/**
39+
* Declare a variable and assign a string value to it with short way;
40+
*/
41+
name := "Ashwin Hegde"
42+
43+
fmt.Println(name)
44+
45+
46+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)