1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 18:17:03 +00:00

HTML view encoding fix

- HTML popup now specifies UTF8 encoding
- Version and build date are captured from goxc
- Version is displayed on status page, and initial log entry
This commit is contained in:
James Hillyerd
2014-03-12 09:09:47 -07:00
parent 8f10e18fef
commit 13868d85d4
7 changed files with 49 additions and 27 deletions

View File

@@ -19,21 +19,31 @@ import (
"time"
)
// Command line flags
var help = flag.Bool("help", false, "Displays this help")
var pidfile = flag.String("pidfile", "none", "Write our PID into the specified file")
var logfile = flag.String("logfile", "stderr", "Write out log into the specified file")
var (
// Build info, populated during linking by goxc
VERSION = "1.0"
BUILD_DATE = "undefined"
// startTime is used to calculate uptime of Inbucket
var startTime = time.Now()
// Command line flags
help = flag.Bool("help", false, "Displays this help")
pidfile = flag.String("pidfile", "none", "Write our PID into the specified file")
logfile = flag.String("logfile", "stderr", "Write out log into the specified file")
// The file we send log output to, will be nil for stderr or stdout
var logf *os.File
// startTime is used to calculate uptime of Inbucket
startTime = time.Now()
var smtpServer *smtpd.Server
var pop3Server *pop3d.Server
// The file we send log output to, will be nil for stderr or stdout
logf *os.File
// Server instances
smtpServer *smtpd.Server
pop3Server *pop3d.Server
)
func main() {
config.VERSION = VERSION
config.BUILD_DATE = BUILD_DATE
flag.Parse()
if *help {
flag.Usage()
@@ -82,6 +92,8 @@ func main() {
}
}
log.LogInfo("Inbucket %v (%v) starting...", config.VERSION, config.BUILD_DATE)
// Write pidfile if requested
// TODO: Probably supposed to remove pidfile during shutdown
if *pidfile != "none" {