मैं इस प्रकार कई स्लाइस मर्ज करने के लिए कोशिश कर रहा हूँ,Concat golang में एक से अधिक स्लाइस
package routes
import (
"net/http"
)
type Route struct {
Name string
Method string
Pattern string
Secured bool
HandlerFunc http.HandlerFunc
}
type Routes []Route
var ApplicationRoutes Routes
func init() {
ApplicationRoutes = append(
WifiUserRoutes,
WifiUsageRoutes,
WifiLocationRoutes,
DashboardUserRoutes,
DashoardAppRoutes,
RadiusRoutes,
AuthenticationRoutes...
)
}
हालांकि builtin संलग्न() दो स्लाइस जोड़कर करने में सक्षम है, इसलिए इस पर संलग्न करने के लिए भी कई तर्क फेंकता समय संकलित करें। क्या कार्य प्राप्त करने के लिए कोई वैकल्पिक कार्य है? या स्लाइस मर्ज करने का एक बेहतर तरीका है?