-port 프로그램 실행 파라미터가 잘 동작하도록 flag parse 하는 코드 추가
This commit is contained in:
@ -3,6 +3,7 @@ package core
|
|||||||
import (
|
import (
|
||||||
"anvil/shared"
|
"anvil/shared"
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
@ -77,6 +78,9 @@ func (gs *AeGameServer) Version() string {
|
|||||||
|
|
||||||
// New :
|
// New :
|
||||||
func New() (*AeGameServer, error) {
|
func New() (*AeGameServer, error) {
|
||||||
|
if !flag.Parsed() {
|
||||||
|
flag.Parse()
|
||||||
|
}
|
||||||
|
|
||||||
logfilename := fmt.Sprintf("AEGS_%s.log", time.Now().Format("2006-01-02T15-04-05"))
|
logfilename := fmt.Sprintf("AEGS_%s.log", time.Now().Format("2006-01-02T15-04-05"))
|
||||||
logFile, err := os.OpenFile(logfilename, os.O_CREATE|os.O_WRONLY|os.O_CREATE, 0666)
|
logFile, err := os.OpenFile(logfilename, os.O_CREATE|os.O_WRONLY|os.O_CREATE, 0666)
|
||||||
|
|||||||
Reference in New Issue
Block a user