Removed typo
the build was successful Details
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Antoine Bartuccio 2018-07-18 20:06:50 +02:00
parent e06a19c776
commit a0a41cf8c8
Signed by: klmp200
GPG Key ID: E7245548C53F904B
2 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@ Le fichier de configuration est passé dans `Configure()` et doit être au forma
"TemplateLayoutPath": "templates/layouts/",
"TemplateExtensionPattern": "*.gohtml",
"ServerPort": "8000",
"ServerListenAdress": "0.0.0.0",
"ServerListenAddress": "0.0.0.0",
"Domain": "http://git.an",
"MainTemplate": "{{define \"main\" }} {{ template \"base\" . }} {{ end }}",
"Debug": false,

View File

@ -2,7 +2,7 @@
* @Author: Bartuccio Antoine
* @Date: 2018-07-14 11:32:11
* @Last Modified by: klmp200
* @Last Modified time: 2018-07-18 19:41:18
* @Last Modified time: 2018-07-18 20:06:08
*/
package gowebframework
@ -29,7 +29,7 @@ type Config struct {
StaticFolderPath string
TemplateExtensionPattern string
ServerPort string
ServerListenAdress string
ServerListenAddress string
SessionProvider string
Domain string
Debug bool
@ -55,8 +55,8 @@ func Configure(config_file_name string, custom_config_file_name string) {
// Starts server
func Start() {
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir(ServerConfig.StaticFolderPath))))
log.Println("Server listening on http://" + ServerConfig.ServerListenAdress + ":" + ServerConfig.ServerPort)
log.Fatal(http.ListenAndServe(ServerConfig.ServerListenAdress+":"+ServerConfig.ServerPort, nil))
log.Println("Server listening on http://" + ServerConfig.ServerListenAddress + ":" + ServerConfig.ServerPort)
log.Fatal(http.ListenAndServe(ServerConfig.ServerListenAddress+":"+ServerConfig.ServerPort, nil))
}
func loadDefaultConfiguration() {
@ -65,7 +65,7 @@ func loadDefaultConfiguration() {
ServerConfig.TemplateLayoutPath = "templates/layouts/"
ServerConfig.TemplateExtensionPattern = "*.gohtml"
ServerConfig.ServerPort = "8000"
ServerConfig.ServerListenAdress = "0.0.0.0"
ServerConfig.ServerListenAddress = "0.0.0.0"
ServerConfig.Domain = "localhost"
ServerConfig.MainTemplate = `{{define "main" }} {{ template "base" . }} {{ end }}`
ServerConfig.Debug = false