Skip to content

Commit b635e1d

Browse files
committed
added more new files
1 parent 906ed1e commit b635e1d

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

handlingtime.go

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
"time"
6+
)
7+
8+
func main() {
9+
fmt.Println("Welcome to the time study of Golang")
10+
presentTime := time.Now()
11+
fmt.Println(presentTime)
12+
13+
fmt.Println(presentTime.Format("01-02-2006 15:04:06 Monday"))
14+
15+
createdDate := time.Date(2023, time.December, 22, 15, 9, 0, 0, time.UTC)
16+
fmt.Println(createdDate)
17+
fmt.Println(createdDate.Format("01-02-2006 15:09:09 Monday"))
18+
19+
}

more.go

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
)
6+
7+
const access string = "ygugwgyweu"
8+
9+
func main() {
10+
var username string = "gaurav"
11+
fmt.Println(username)
12+
fmt.Printf("Variable is of type %T \n", username)
13+
14+
var isloggedin bool = true
15+
fmt.Println(isloggedin)
16+
fmt.Printf("Variable is of type %T \n", isloggedin)
17+
18+
var val uint8 = 255
19+
fmt.Println(val)
20+
fmt.Printf("Variable is of type %T \n", val)
21+
22+
// default values and some aliases
23+
var anothervalue int
24+
fmt.Println(anothervalue)
25+
fmt.Printf("Variable is of type %T \n", anothervalue)
26+
27+
// implicit type
28+
var newval = "gaurav.shukla.in"
29+
fmt.Println(newval)
30+
31+
number := 3000.0
32+
fmt.Println(number)
33+
34+
fmt.Println(access)
35+
fmt.Printf("variable is of type : %T \n", access)
36+
}

user.go

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
)
6+
7+
func main() {
8+
var name string
9+
fmt.Println("Enter your name: ")
10+
fmt.Scanf("%s", &name)
11+
fmt.Println("Hey there, ", name)
12+
}

0 commit comments

Comments
 (0)