Golang设计模式之享元模式 Jackey Golang 2020-12-31 2,323 次浏览 Golang, 享元模式, 设计模式 创建文件ImageFlyWeight.go package FlyWeight import "fmt" type ImageFlyWeight struct { data string } // 初始化 func NewImageFlyWeight(filename string) *ImageFlyWeight { data := fmt.Sprintf("image ...