mirror of https://github.com/writeas/writefreely
A focused writing and publishing space.
https://write.with.parts
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
341 B
17 lines
341 B
package config
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
// FriendlyHost returns the app's Host sans any schema
|
|
func (ac AppCfg) FriendlyHost() string {
|
|
return ac.Host[strings.Index(ac.Host, "://")+len("://"):]
|
|
}
|
|
|
|
func (ac AppCfg) CanCreateBlogs(currentlyUsed uint64) bool {
|
|
if ac.MaxBlogs <= 0 {
|
|
return true
|
|
}
|
|
return int(currentlyUsed) < ac.MaxBlogs
|
|
}
|
|
|