mirror of
https://github.com/nicksherron/bashhub-server.git
synced 2024-11-10 09:02:54 +08:00
internal/server: comment refactoring
This commit is contained in:
parent
bc3a02bd06
commit
3c02bb5e70
1 changed files with 3 additions and 8 deletions
|
@ -101,15 +101,10 @@ type Config struct {
|
|||
ID int
|
||||
Created time.Time
|
||||
}
|
||||
|
||||
type Import Query
|
||||
|
||||
var (
|
||||
// Addr is the listen and server address for our server (gin)
|
||||
//Addr string
|
||||
// LogFile is the log file location for http logging. Default is stderr.
|
||||
//logFile string
|
||||
config Config
|
||||
)
|
||||
var config Config
|
||||
|
||||
func getLog(logFile string) io.Writer {
|
||||
switch {
|
||||
|
@ -126,7 +121,7 @@ func getLog(logFile string) io.Writer {
|
|||
}
|
||||
}
|
||||
|
||||
// LoggerWithFormatter instance a Logger middleware with the specified log format function.
|
||||
// loggerWithFormatterWriter instance a Logger middleware with the specified log format function.
|
||||
func loggerWithFormatterWriter(logFile string, f gin.LogFormatter) gin.HandlerFunc {
|
||||
return gin.LoggerWithConfig(gin.LoggerConfig{
|
||||
Formatter: f,
|
||||
|
|
Loading…
Reference in a new issue