/usr/share/gocode/src/github.com/tendermint/go-wire/string.go is in golang-github-tendermint-go-wire-dev 0~20161027~0git287d8ca-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | package wire
import (
"io"
)
func WriteString(s string, w io.Writer, n *int, err *error) {
WriteByteSlice([]byte(s), w, n, err)
}
func ReadString(r io.Reader, lmt int, n *int, err *error) string {
return string(ReadByteSlice(r, lmt, n, err))
}
func PutString(buf []byte, s string) (n int, err error) {
return PutByteSlice(buf, []byte(s))
}
func GetString(buf []byte) (s string, n int, err error) {
bz, n, err := GetString(buf)
return string(bz), n, err
}
|