discountRate added to struct
This commit is contained in:
parent
7f5e074730
commit
9c1a8d8e99
1 changed files with 2 additions and 1 deletions
|
@ -3,11 +3,12 @@ package structs
|
|||
import "fmt"
|
||||
|
||||
func Demo1() {
|
||||
fmt.Println(product{"Computer", 5000, "XYZ"})
|
||||
fmt.Println(product{"Computer", 5000, "XYZ", 20})
|
||||
}
|
||||
|
||||
type product struct {
|
||||
name string
|
||||
unitPrice float64
|
||||
brand string
|
||||
discountRate int
|
||||
}
|
Loading…
Add table
Reference in a new issue