package main
import "fmt"
type Employee struct {
Id int64
Name string
}
func main() {
emp := Employee{Id:1200, Name: "hoge fuge"}
fmt.Printf("%+v\n",emp) // Print with Variable Name
fmt.Printf("%v\n",emp) // Without Variable Name
fmt.Printf("%d\n",emp.Id)
fmt.Printf("%s\n",emp.Name)
}
More than 3 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme