1 Star 0 Fork 0

marker / go-bindata

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
stringwriter.go 446 Bytes
Copy Edit Raw Blame History
Jim Teeuwen authored 2013-07-26 04:46 +08:00 . * Bump version to new release: 2.0.0
// This work is subject to the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
// license. Its contents can be found at:
// http://creativecommons.org/publicdomain/zero/1.0/
package main
import (
"fmt"
"io"
)
type StringWriter struct {
io.Writer
c int
}
func (w *StringWriter) Write(p []byte) (n int, err error) {
if len(p) == 0 {
return
}
for n = range p {
fmt.Fprintf(w.Writer, "\\x%02x", p[n])
w.c++
}
n++
return
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/marker/go-bindata.git
git@gitee.com:marker/go-bindata.git
marker
go-bindata
go-bindata
v2.0.1

Search