-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.go
More file actions
55 lines (44 loc) · 1.19 KB
/
Copy pathindex.go
File metadata and controls
55 lines (44 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package main
// HelloWorld
// func main(){
// fmt.Print("Hello World!")
// }
// * 1.Variables
// var name ="Jabeed"
// func main() {
// var movie ="Batman"
// var country string ="INDIA"
// var age int =18
// var height float64= 5.10
// var isDeveloper = true
// fmt.Println(movie,country,age,height,isDeveloper,"name:", name )
// }
// shorthand declaration for varables
// func main() {
// name := "Jabeed"
// age := 25
// height := 5.9
// isDeveloper := true
// fmt.Println(name, age, height, isDeveloper)
// }
// public variable starts with capital letter
// const Jwt string="nx78w34fcbnx034fcg7"
// func main() {
// var emptyString string
// var emptyInt int
// fmt.Println(emptyString) // prints: (empty - nothing)
// fmt.Println(emptyInt) // prints: 0
// fmt.println(Jwt)
// }
//* Comma ok syntax and packages
// func main() {
// welcome := "welcome to user input"
// fmt.Println(welcome)
// reader := bufio.NewReader(os.Stdin)
// fmt.Println("Enter your rating: ")
// input ,err:=reader.ReadString('\n')
// // input, _ := reader.ReadString('\n')
// // _ : to ignore the value
// fmt.Println("Thanks for rating:", input)
// fmt.Println("Error :", err)
// }