gokursu/structs/demo1.go

16 lines
227 B
Go
Raw Normal View History

2024-01-20 11:42:21 +00:00
package structs
import "fmt"
func Demo1() {
2024-01-20 11:53:20 +00:00
fmt.Println(product{name:"Computer", unitPrice: 5000, brand: "XYZ", discountRate: 20})
2024-01-20 11:42:21 +00:00
}
type product struct {
name string
unitPrice float64
brand string
2024-01-20 11:48:38 +00:00
discountRate int
}