-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Oleksandr Matkovskyi
committed
Sep 11, 2023
1 parent
bbd35c1
commit 69794dc
Showing
4 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module structs | ||
|
||
go 1.21.0 | ||
go 1.21.1 |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package zoo | ||
|
||
// Private struct, visible inside this package only | ||
type zookeeper struct { | ||
// Contains different field names with different types | ||
Name string | ||
Surname string | ||
Age int | ||
Experience int | ||
} | ||
|
||
type animal struct { | ||
Kind string | ||
Name string | ||
Number_of_legs int | ||
} | ||
|
||
type cage struct { | ||
Size string | ||
Color string | ||
Number int | ||
} | ||
|
||
var Mihalich = zookeeper{"Mihail", "Ivanov", 56, 30} | ||
var Spider = animal{Kind: "spider", Name: "Gora", Number_of_legs: 8} |