package
Version:
v0.0.0-...-8d22ec3
Opens a new window with list of versions in this module.
Published: Jan 21, 2025
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
定义被适配的类
func (a *Adaptee) SpecificExecute()
定义了用于执行的方法SpecificExecute()
Adapter 是新接口 Target 的适配器,继承了 Adaptee 类
实现 Target 接口,同时继承了 Adaptee 类
type ObjectAdaptee struct {
}
适配者类
type ObjectTarget interface {
Execute()
}
目标接口
type Target interface {
Execute()
}
目标接口
Source Files
¶
Click to show internal directories.
Click to hide internal directories.