Debian Codegraph @

dstream/gen/replace.tmpl

raw
1 package dstream
2
3 import (
4 "fmt"
5 "time"
6 )
7
8 func (r *replaceColumn) GetPos(j int) interface{} {
9
10 if j != r.colpos {
11 return r.source.GetPos(j)
12 }
13
14 switch z := r.coldata.(type) {
15 {{- range . }}
16 case []{{ .Type }}:
17 return z[r.rowpos:r.rowpos+r.csize]
18 {{- end }}
19 default:
20 msg := fmt.Sprintf("unknown type %T\n", z)
21 panic(msg)
22 }
23 }