Removed typo
All checks were successful
continuous-integration/drone/push Build is passing
the build was successful

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/", "TemplateLayoutPath": "templates/layouts/",
"TemplateExtensionPattern": "*.gohtml", "TemplateExtensionPattern": "*.gohtml",
"ServerPort": "8000", "ServerPort": "8000",
"ServerListenAdress": "0.0.0.0", "ServerListenAddress": "0.0.0.0",
"Domain": "http://git.an", "Domain": "http://git.an",
"MainTemplate": "{{define \"main\" }} {{ template \"base\" . }} {{ end }}", "MainTemplate": "{{define \"main\" }} {{ template \"base\" . }} {{ end }}",
"Debug": false, "Debug": false,

View File

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