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