control/controlclient: remove a number literal in string slice offset

pull/186/head
Brad Fitzpatrick 5 years ago
parent 42e98d4edc
commit 19cc4f8b8e

@ -100,8 +100,9 @@ func (nm *NetworkMap) Concise() string {
}
derp := p.DERP
if strings.HasPrefix(derp, "127.3.3.40:") {
derp = "D" + derp[11:]
const derpPrefix = "127.3.3.40:"
if strings.HasPrefix(derp, derpPrefix) {
derp = "D" + derp[len(derpPrefix):]
}
// Most of the time, aip is just one element, so format the

Loading…
Cancel
Save