1 Star 0 Fork 21

丁延超 / Fyne

forked from Gitee 极速下载 / Fyne 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
serialise.go 582 Bytes
一键复制 编辑 原始数据 按行查看 历史
package fyne
import (
"bytes"
"fmt"
)
// GoString converts a Resource object to Go code.
// This is useful if serialising to a Go file for compilation into a binary.
func (r *StaticResource) GoString() string {
var buffer bytes.Buffer
buffer.WriteString("&fyne.StaticResource{\n")
buffer.WriteString("\tStaticName: \"" + r.StaticName + "\",\n")
buffer.WriteString("\tStaticContent: []byte{\n\t\t")
for i, v := range r.StaticContent {
if i > 0 {
buffer.WriteString(", ")
}
buffer.WriteString(fmt.Sprint(v))
}
buffer.WriteString("}}")
return buffer.String()
}
Go
1
https://gitee.com/chao0225/Fyne.git
git@gitee.com:chao0225/Fyne.git
chao0225
Fyne
Fyne
master

搜索帮助