Исходники и презентации
This commit is contained in:
18
lessons/interfaces/empty_interface/main.go
Normal file
18
lessons/interfaces/empty_interface/main.go
Normal file
@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
type Nothing interface{}
|
||||
|
||||
func main() {
|
||||
var nothing Nothing
|
||||
var empty interface{}
|
||||
var any any
|
||||
|
||||
nothing = empty
|
||||
nothing = any
|
||||
|
||||
empty = nothing
|
||||
empty = any
|
||||
|
||||
any = nothing
|
||||
any = empty
|
||||
}
|
||||
Reference in New Issue
Block a user