Advancedtraning

command
v0.0.0-...-4056b1e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
LRU
方法的接收者只能是结构类型 不能是接口 所以绑定在Shape类型上的Area方法,Rectangle如果调用,传入的参数在方法内部还是会当成Shape来处理,而不是Rectangle类 在Go做面向对象时应谨慎,它是has a 而不是 is a,父类对象没法调用子类对象上的方法
方法的接收者只能是结构类型 不能是接口 所以绑定在Shape类型上的Area方法,Rectangle如果调用,传入的参数在方法内部还是会当成Shape来处理,而不是Rectangle类 在Go做面向对象时应谨慎,它是has a 而不是 is a,父类对象没法调用子类对象上的方法

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL