go-organization/simple-structure/package-str/great/great.go

47 lines
728 B
Go

package great
import "fmt"
var Name = "deniz"
var name2 = "deniz2"
type Car struct {
Name string
Color string
}
func (c Car) String() string {
return fmt.Sprintf("car color:%q | name:%q", c.Color, c.Name)
}
type car2 struct {
Name string
Color string
}
func (c car2) String() string {
return fmt.Sprintf("car color:%q | name:%q", c.Color, c.Name)
}
type Car3 struct {
Name string
color string
}
func (c Car3) String() string {
return fmt.Sprintf("car color:%q | name:%q", c.color, c.Name)
}
func (c *Car) reset() {
c.Name = ""
c.Color = ""
}
func (c *Car) Reset2() {
c.Name = ""
c.Color = ""
}
func Hello() {
fmt.Println("Hello World (go-organization/simple-structure/package-str/great/great.go)")
}