You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: router.go
    path of file: ./repos/Go/01-Gin框架/codes/05-自定义错误处理/ginDemo/router
    
    the code of the file until where you have to start completion: package router

import (
	"ginDemo/middleware/logger"
	"ginDemo/middleware/recover"
	"ginDemo/middleware/sign"
	"ginDemo/rout
    
func InitRouter(r *gin.Engine)  {

	r.Use(logger.LoggerToFile(), recover.Recover())

	// v1 版本
	GroupV1 := r.Group("/v1")
	{
		GroupV1.Any("/product/add", v1.AddProduct)
		GroupV1.Any("/member/add", v1.AddMember)
	}

	// v2 版本
	GroupV2 := r.Group("/v2").Use(sign.Sign())
	{
		GroupV2.Any("/product/add", v2.AddProduct)
		GroupV2.Any("/member/add", v2.AddMember)
	}

	// 绑定验证器
	if v, ok := binding.Validator.Engine().(*validator.Validate); ok {
		v.RegisterValidation("NameValid", member.NameValid)
	}
}