37 lines
619 B
Go
37 lines
619 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 Hello() {
|
|
fmt.Println("Hello World (go-organization/simple-structure/package-str/great/great.go)")
|
|
}
|