Mercurial > gemma
diff pkg/imports/sr.go @ 4791:1fef4679b07a
Added an endpoint GET api/imports/export to export imports.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 25 Oct 2019 13:03:50 +0200 |
parents | 0feddad5bb6d |
children | f4abfd0ee8ad |
line wrap: on
line diff
--- a/pkg/imports/sr.go Fri Oct 25 11:13:31 2019 +0200 +++ b/pkg/imports/sr.go Fri Oct 25 13:03:50 2019 +0200 @@ -215,6 +215,22 @@ ` ) +func (sr *SoundingResult) Description() (string, error) { + + var descs []string + + if sr.Bottleneck != nil { + descs = append(descs, *sr.Bottleneck) + } + if sr.Date != nil { + descs = append(descs, (*sr).Date.Format(common.DateFormat)) + } + if sr.NegateZ != nil && *sr.NegateZ { + descs = append(descs, "negateZ") + } + return strings.Join(descs, "|"), nil +} + func (sr *SoundingResult) singleBeam() bool { return sr.SingleBeam != nil && *sr.SingleBeam }