What do the three dots in the golang code mean?

what do the three dots in the golang code below mean? The penultimate line:

func Load(g *gin.Engine, mw ...gin.HandlerFunc) *gin.Engine {
    g.Use(middleware.NoCache) 
    g.Use(middleware.Options) 
    g.Use(middleware.Secure)
    g.Use(mw...)  //

    return g
}





Oct.24,2021

then the type of mu is [] gin.HandelerFunc
which is equivalent to entering all the elements in slice into the function


in the syntax of JS,PHP,Ruby, it should be called the expansion operator (escape

).
Menu