aboutsummaryrefslogtreecommitdiff
path: root/content.go
blob: 8603c35bdc52e3982c372ba94473933b9424e667 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright (C) 2021-2021 Fuwn
// SPDX-License-Identifier: GPL-3.0-only

package main

func GetContent(file string) string {
	contents, err := contentFilesystem.ReadFile("content/" + file)

	if err != nil {
		return `# ERROR READING FILE

I seem to be having some trouble reading the contents of the "` + file + `" file... Try refreshing the page and if the problem persists, contact Fuwn!`
	}

	return string(contents)
}