comparison pkg/imports/bn.go @ 2765:41f5ac76d642

BT import: allow for rb and lb to be null. As rb_lb is optional according to drc this is the right thing to do.
author Sascha Wilde <wilde@intevation.de>
date Thu, 21 Mar 2019 18:55:52 +0100
parents 018f979f9e23
children b3c3c5b5b7c1
comparison
equal deleted inserted replaced
2764:f0846d200ce4 2765:41f5ac76d642
124 // CleanUp of a bottleneck import is a NOP. 124 // CleanUp of a bottleneck import is a NOP.
125 func (*Bottleneck) CleanUp() error { return nil } 125 func (*Bottleneck) CleanUp() error { return nil }
126 126
127 var rblbRe = regexp.MustCompile(`(..)_(..)`) 127 var rblbRe = regexp.MustCompile(`(..)_(..)`)
128 128
129 func splitRBLB(s string) (string, string) { 129 func splitRBLB(s string) (*string, *string) {
130 m := rblbRe.FindStringSubmatch(s) 130 m := rblbRe.FindStringSubmatch(s)
131 if len(m) == 0 { 131 if len(m) == 0 {
132 return "", "" 132 return nil, nil
133 } 133 }
134 return m[1], m[2] 134 return &m[1], &m[2]
135 } 135 }
136 136
137 func revisitingTime(s string) int { 137 func revisitingTime(s string) int {
138 v, err := strconv.Atoi(s) 138 v, err := strconv.Atoi(s)
139 if err != nil { 139 if err != nil {