aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-04-19 15:07:46 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-04-19 15:07:46 +0200
commit83ed187dbc6d1ef5f08d74aa57a7d17e907581c9 (patch)
tree978a49da113a050c60bd8a803e0d641255f82ede /main.go
parent27efd5384b5e0e77f44c754c7cbd39751733d995 (diff)
downloadguichet-83ed187dbc6d1ef5f08d74aa57a7d17e907581c9.tar.gz
guichet-83ed187dbc6d1ef5f08d74aa57a7d17e907581c9.zip
reformat code
Diffstat (limited to 'main.go')
-rw-r--r--main.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/main.go b/main.go
index ca33795..ae8fe06 100644
--- a/main.go
+++ b/main.go
@@ -48,8 +48,8 @@ type ConfigFile struct {
GroupCanInvite string `json:"group_can_invite"`
GroupCanAdmin string `json:"group_can_admin"`
- S3AdminEndpoint string `json:"s3_admin_endpoint"`
- S3AdminToken string `json:"s3_admin_token"`
+ S3AdminEndpoint string `json:"s3_admin_endpoint"`
+ S3AdminToken string `json:"s3_admin_token"`
S3Endpoint string `json:"s3_endpoint"`
S3AccessKey string `json:"s3_access_key"`
@@ -105,12 +105,12 @@ func readConfig() ConfigFile {
}
func getTemplate(name string) *template.Template {
- return template.Must(template.New("layout.html").Funcs(template.FuncMap {
- "contains": strings.Contains,
- }).ParseFiles(
- templatePath+"/layout.html",
- templatePath+"/"+name,
- ))
+ return template.Must(template.New("layout.html").Funcs(template.FuncMap{
+ "contains": strings.Contains,
+ }).ParseFiles(
+ templatePath+"/layout.html",
+ templatePath+"/"+name,
+ ))
}
func main() {
@@ -137,10 +137,10 @@ func main() {
r.HandleFunc("/directory/search", handleDirectorySearch)
r.HandleFunc("/directory", handleDirectory)
- r.HandleFunc("/garage/key", handleGarageKey)
- r.HandleFunc("/garage/website", handleGarageWebsiteList)
- r.HandleFunc("/garage/website/new", handleGarageWebsiteNew)
- r.HandleFunc("/garage/website/b/{bucket}", handleGarageWebsiteInspect)
+ r.HandleFunc("/garage/key", handleGarageKey)
+ r.HandleFunc("/garage/website", handleGarageWebsiteList)
+ r.HandleFunc("/garage/website/new", handleGarageWebsiteNew)
+ r.HandleFunc("/garage/website/b/{bucket}", handleGarageWebsiteInspect)
r.HandleFunc("/invite/new_account", handleInviteNewAccount)
r.HandleFunc("/invite/send_code", handleInviteSendCode)
@@ -260,7 +260,7 @@ func checkLogin(w http.ResponseWriter, r *http.Request) *LoginStatus {
"mail",
"memberof",
"description",
- "garage_s3_access_key",
+ "garage_s3_access_key",
FIELD_NAME_DIRECTORY_VISIBILITY,
FIELD_NAME_PROFILE_PICTURE,
},