From 0eebc491d43be98382b567bee90babf68c991517 Mon Sep 17 00:00:00 2001 From: Oliver Jakoubek Date: Fri, 29 May 2020 14:20:18 +0200 Subject: [PATCH] Added method NextRouteCode to feragstring - returns the next autoincrement route code. --- ferag.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ferag.go b/ferag.go index 6337943..3faafb5 100644 --- a/ferag.go +++ b/ferag.go @@ -77,6 +77,10 @@ func (fs *FeragString) AddRouteListEntry(rl *RouteListEntry) error { return nil } +func (fs *FeragString) NextRouteCode() int { + return fs.RouteListEntryCount + 1 +} + func (fs *FeragString) AddRouteInfo(ri *RouteInfo) error { fs.RouteInfoEntries = append(fs.RouteInfoEntries, ri) return nil