mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-28 21:31:46 -05:00
Bump some deprecations
This commit is contained in:
parent
84f4b731d2
commit
b6798ee867
3 changed files with 6 additions and 6 deletions
|
@ -516,8 +516,8 @@ func (c *commandeer) setValueFromFlag(flags *flag.FlagSet, key string) {
|
||||||
if _, deprecated := deprecatedFlags[strings.ToLower(key)]; deprecated {
|
if _, deprecated := deprecatedFlags[strings.ToLower(key)]; deprecated {
|
||||||
msg := fmt.Sprintf(`Set "%s = true" in your config.toml.
|
msg := fmt.Sprintf(`Set "%s = true" in your config.toml.
|
||||||
If you need to set this configuration value from the command line, set it via an OS environment variable: "HUGO_%s=true hugo"`, key, strings.ToUpper(key))
|
If you need to set this configuration value from the command line, set it via an OS environment variable: "HUGO_%s=true hugo"`, key, strings.ToUpper(key))
|
||||||
// Remove in Hugo 0.37
|
// Remove in Hugo 0.38
|
||||||
helpers.Deprecated("hugo", "--"+key+" flag", msg, false)
|
helpers.Deprecated("hugo", "--"+key+" flag", msg, true)
|
||||||
}
|
}
|
||||||
f := flags.Lookup(key)
|
f := flags.Lookup(key)
|
||||||
c.Set(key, f.Value.String())
|
c.Set(key, f.Value.String())
|
||||||
|
|
|
@ -116,7 +116,7 @@ Some examples:
|
||||||
// "logo" will match logo.png. It returns nil of none found.
|
// "logo" will match logo.png. It returns nil of none found.
|
||||||
// In potential ambiguous situations, combine it with ByType.
|
// In potential ambiguous situations, combine it with ByType.
|
||||||
func (r Resources) GetByPrefix(prefix string) Resource {
|
func (r Resources) GetByPrefix(prefix string) Resource {
|
||||||
helpers.Deprecated("Resources", "GetByPrefix", prefixDeprecatedMsg, false)
|
helpers.Deprecated("Resources", "GetByPrefix", prefixDeprecatedMsg, true)
|
||||||
prefix = strings.ToLower(prefix)
|
prefix = strings.ToLower(prefix)
|
||||||
for _, resource := range r {
|
for _, resource := range r {
|
||||||
if matchesPrefix(resource, prefix) {
|
if matchesPrefix(resource, prefix) {
|
||||||
|
@ -129,7 +129,7 @@ func (r Resources) GetByPrefix(prefix string) Resource {
|
||||||
// ByPrefix gets all resources matching the given base filename prefix, e.g
|
// ByPrefix gets all resources matching the given base filename prefix, e.g
|
||||||
// "logo" will match logo.png.
|
// "logo" will match logo.png.
|
||||||
func (r Resources) ByPrefix(prefix string) Resources {
|
func (r Resources) ByPrefix(prefix string) Resources {
|
||||||
helpers.Deprecated("Resources", "ByPrefix", prefixDeprecatedMsg, false)
|
helpers.Deprecated("Resources", "ByPrefix", prefixDeprecatedMsg, true)
|
||||||
var matches Resources
|
var matches Resources
|
||||||
prefix = strings.ToLower(prefix)
|
prefix = strings.ToLower(prefix)
|
||||||
for _, resource := range r {
|
for _, resource := range r {
|
||||||
|
|
|
@ -133,8 +133,8 @@ func (fi *FileInfo) FileInfo() os.FileInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (fi *FileInfo) Bytes() []byte {
|
func (fi *FileInfo) Bytes() []byte {
|
||||||
// Remove in Hugo 0.34
|
// Remove in Hugo 0.38
|
||||||
helpers.Deprecated("File", "Bytes", "", false)
|
helpers.Deprecated("File", "Bytes", "", true)
|
||||||
return []byte("")
|
return []byte("")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue