go-bgp

a collection of golang BGP tools to monitor, archive and serve
git clone git://git.2f30.org/go-bgp
Log | Files | Refs | README

commit c2fee0e4b857a5e96e8b9eac5b719fe5fff9f77a
parent c0b0f39a016f36b92b2cb314a2b4ad7ac4273a19
Author: dsp <dsp@2f30.org>
Date:   Thu, 12 Feb 2015 11:27:46 -0700

now Get function on the url request, parses seconds too

Diffstat:
Marchive/archive.go | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/archive/archive.go b/archive/archive.go @@ -20,8 +20,6 @@ import ( "net/url" ) - - //constants for archentryfile.ftype const ( mrtfile = iota @@ -151,10 +149,11 @@ func (fsa *fsarchive) GetImpl(values url.Values, ar archive) (int, chan reply) { retc <- reply{data: nil, err: errbadreq} goto done } + //This will parse pairs of start=YYYYMMDDHHMMSS&end=YYYYMMDDHHMMSS requests for i := 0; i < len(timeAstrs); i++ { log.Printf("timeAstr:%s timeBstr:%s", timeAstrs[i], timeBstrs[i]) - timeA, errtime := time.Parse("200601021504", timeAstrs[i]) - timeB, errtime := time.Parse("200601021504", timeBstrs[i]) + timeA, errtime := time.Parse("20060102150405", timeAstrs[i]) + timeB, errtime := time.Parse("20060102150405", timeBstrs[i]) if errtime != nil || timeB.Before(timeA) { retc <- reply{data: nil, err: errbaddate} } else {