Created
August 14, 2021 07:20
-
-
Save petrjahoda/fec618e230a12c0eeab888e510ae3451 to your computer and use it in GitHub Desktop.
1. The basics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
type Car struct { | |
name string | |
} | |
type Truck struct { | |
name string | |
} | |
func main() { | |
bmw := Car{name: "bmw is the best car"} | |
volvo := Truck{name: "volvo is the best truck"} | |
fmt.Println(bmw.name) | |
fmt.Println(volvo.name) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment