func Init(appName string, config Config) *Togo {
	Log.SetPrefix(fmt.Sprintf("[%s] ", appName))

	return &Togo{
		appName:     appName,
		logFilename: config.LogFilename,
		Router:      &router.Router{},
		server: &http.Server{
			Addr:         fmt.Sprintf("%s:%s", config.HTTPAddr, config.HTTPPort),
			ReadTimeout:  time.Duration(config.ReadTimeout) * time.Second,
			WriteTimeout: time.Duration(config.WriteTimeout) * time.Second,
			IdleTimeout:  time.Duration(config.IdleTimeout) * time.Second,
		},
	}
}
// Init will set up the name, logging, and the HTTP server.
Init will set up the name, logging, and the HTTP server.
// Init will set up the name logging and the HTTP server .
func Init(appName string, config Config) *Togo {
	Log.SetPrefix(fmt.Sprintf("[%s] ", appName))
	return &Togo{
		appName:     appName,
		logFilename: config.LogFilename,
		Router:      &router.Router{},
		server: &http.Server{
			Addr:         fmt.Sprintf("%s:%s", config.HTTPAddr, config.HTTPPort),
			ReadTimeout:  time.Duration(config.ReadTimeout) * time.Second,
			WriteTimeout: time.Duration(config.WriteTimeout) * time.Second,
			IdleTimeout:  time.Duration(config.IdleTimeout) * time.Second,
		},
	}
}
func Init ( appName string , config Config ) * Togo { Log . SetPrefix ( fmt . Sprintf ( " " , appName ) ) return & Togo { appName : appName , logFilename : config . LogFilename , Router : & router . Router { } , server : & http . Server { Addr : fmt . Sprintf ( " " , config . HTTPAddr , config . HTTPPort ) , ReadTimeout : time . Duration ( config . ReadTimeout ) * time . Second , WriteTimeout : time . Duration ( config . WriteTimeout ) * time . Second , IdleTimeout : time . Duration ( config . IdleTimeout ) * time . Second , } , } }
Init will set up the name, logging, and the HTTP server.
Init will set up the name logging and the HTTP server .