add anc
This commit is contained in:
3
pkg/cache/driver_test.go
vendored
3
pkg/cache/driver_test.go
vendored
@@ -1,8 +1,9 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestSet(t *testing.T) {
|
||||
|
||||
@@ -776,6 +776,16 @@ func (s *settingProvider) PWA(ctx context.Context) *PWASetting {
|
||||
}
|
||||
}
|
||||
|
||||
// AnnouncementEnabled returns true if announcement is enabled.
|
||||
func (s *settingProvider) AnnouncementEnabled(ctx context.Context) bool {
|
||||
return s.getBoolean(ctx, "announcement_enabled", false)
|
||||
}
|
||||
|
||||
// Announcement returns the site announcement content.
|
||||
func (s *settingProvider) Announcement(ctx context.Context) string {
|
||||
return s.getString(ctx, "announcement", "")
|
||||
}
|
||||
|
||||
func IsTrueValue(val string) bool {
|
||||
return val == "1" || val == "true"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user