diff --git a/cmd/server.go b/cmd/server.go index 1149cb3..aac8313 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -48,17 +48,18 @@ var serverCmd = &cobra.Command{ } mediaClient, err := media.NewMediaClientFromViper() - if err != nil { - log.Fatal(err) + switch err != nil { + case true: + log.Printf("media.NewMediaClientFromViper error: %s", err) + case false: + new_buckets, err := mediaClient.Seed() + if err != nil { + log.Printf("(*media.MediaClient).Seed error: %s", err) + } else { + log.Printf("Seeded %d buckets.\n", len(new_buckets)) + } } - new_buckets, err := mediaClient.Seed() - if err != nil { - log.Fatal(err) - } - - log.Printf("Seeded %d buckets.\n", len(new_buckets)) - RunServer() }, } diff --git a/templates/html/documentation.gohtml b/templates/html/documentation.gohtml index ce687a0..ea18bd3 100644 --- a/templates/html/documentation.gohtml +++ b/templates/html/documentation.gohtml @@ -12,17 +12,21 @@

Documentation

- {{ range .Data.Buckets }} - {{ $bucket_name := .Name }} - {{ $bucket_display_name := .DisplayName }} -

- {{ $bucket_display_name }} - -
+ {{ if not .Data.Buckets }} +Documentation non-accessible pour l'instant, merci de votre patience + {{ else }} + {{ range .Data.Buckets }} + {{ $bucket_name := .Name }} + {{ $bucket_display_name := .DisplayName }} +
+ {{ $bucket_display_name }} + +
+ {{ end }} {{ end }}