common

package
v0.0.0-...-b51db10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUUID

func CreateUUID() string

CreateUUID creates a unique id

func FormatString

func FormatString(s string) string

FormatString transform string to kebab-case This is used to create the url string for topic from topic's title.

func GetDatabase

func GetDatabase() *gorm.DB

GetDatabase gives out the database instance where its needed

func SetDatabase

func SetDatabase(database *gorm.DB)

SetDatabase makes it so GetDatabase can retrieve the database

Types

type JSON

type JSON = map[string]interface{}

JSON alias type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL