mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
common/hugo: Add hugo.IsServer and hugo.IsDevelopment
And deprecate site.IsServer. Closes #11510
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
274852bcf2
commit
d1b4458536
@@ -159,6 +159,7 @@ func TestDecodeCascadeConfig(t *testing.T) {
|
||||
|
||||
type testConfig struct {
|
||||
environment string
|
||||
running bool
|
||||
workingDir string
|
||||
}
|
||||
|
||||
@@ -166,6 +167,10 @@ func (c testConfig) Environment() string {
|
||||
return c.environment
|
||||
}
|
||||
|
||||
func (c testConfig) Running() bool {
|
||||
return c.running
|
||||
}
|
||||
|
||||
func (c testConfig) WorkingDir() string {
|
||||
return c.workingDir
|
||||
}
|
||||
|
Reference in New Issue
Block a user