leanring struct... kinda pain in the brain

This commit is contained in:
2026-09-15 10:41:01 -04:00
parent c7e02d7e06
commit 3880ff31f4
2 changed files with 26 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
module main
go 1.27.1
+23
View File
@@ -0,0 +1,23 @@
package main
import (
"fmt"
"time"
)
type Employee struct {
Name string
EID int
Boss *Employee
Hired time.Time
}
func main() {
e := Employee{
Name: "Zack",
EID: 1,
Hired: time.Now(),
}
fmt.Println(e.Name, e.Hired.Format(time.RFC1123))
}