mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Initial commit
This commit is contained in:
20
vendor/github.com/markbates/oncer/deprecate.go
generated
vendored
Normal file
20
vendor/github.com/markbates/oncer/deprecate.go
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
package oncer
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
)
|
||||
|
||||
const deprecated = "DEPRECATED"
|
||||
|
||||
var deprecationWriter io.Writer = os.Stdout
|
||||
|
||||
func Deprecate(depth int, name string, msg string) {
|
||||
Do(deprecated+name, func() {
|
||||
fmt.Fprintf(deprecationWriter, "[%s] %s has been deprecated.\n", deprecated, name)
|
||||
if len(msg) > 0 {
|
||||
fmt.Fprintf(deprecationWriter, "\t%s\n", msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user