MCPcopy Create free account
hub / github.com/go-pg/pg / ScanString

Function ScanString

types/scan.go:67–78  ·  view source on GitHub ↗
(rd Reader, n int)

Source from the content-addressed store, hash-verified

65}
66
67func ScanString(rd Reader, n int) (string, error) {
68 if n <= 0 {
69 return "", nil
70 }
71
72 b, err := rd.ReadFull()
73 if err != nil {
74 return "", err
75 }
76
77 return internal.BytesToString(b), nil
78}
79
80func ScanBytes(rd Reader, n int) ([]byte, error) {
81 if n == -1 {

Callers 3

ScanFunction · 0.85
ReadColumnValueFunction · 0.85
scanStringValueFunction · 0.85

Calls 2

BytesToStringFunction · 0.92
ReadFullMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…