init
This commit is contained in:
commit
e1909b04b2
16 changed files with 448 additions and 0 deletions
7
utils/strings.go
Normal file
7
utils/strings.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package utils
|
||||
|
||||
import "fmt"
|
||||
|
||||
func HeadTitle(text string) string {
|
||||
return fmt.Sprintf("%s | Roleypoly", text)
|
||||
}
|
13
utils/strings_test.go
Normal file
13
utils/strings_test.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
package utils_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"git.sapphic.engineer/roleypoly/v4/utils"
|
||||
)
|
||||
|
||||
func TestHeadTitle(t *testing.T) {
|
||||
assert.Equal(t, utils.HeadTitle("Hello World"), "Hello World | Roleypoly")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue