Rename RegisterDirective to RegisterDevDirective
There is no good reason to be different than Caddy and allows us to piggyback on it's documentation.
This commit is contained in:
parent
7db3511efc
commit
0c57748be2
1 changed files with 5 additions and 4 deletions
|
@ -6,9 +6,10 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RegisterDirective splices name into the list of directives
|
// RegisterDevDirective splices name into the list of directives
|
||||||
// immediately before another directive. .
|
// immediately before another directive. This function is ONLY
|
||||||
// If before is empty,
|
// for plugin development purposes! NEVER use it for a plugin
|
||||||
|
// that you are not currently building. If before is empty,
|
||||||
// the directive will be appended to the end of the list.
|
// the directive will be appended to the end of the list.
|
||||||
//
|
//
|
||||||
// It is imperative that directives execute in the proper
|
// It is imperative that directives execute in the proper
|
||||||
|
@ -22,7 +23,7 @@ import (
|
||||||
// Directive names must be lower-cased and unique. Any errors
|
// Directive names must be lower-cased and unique. Any errors
|
||||||
// here are fatal, and even successful calls print a message
|
// here are fatal, and even successful calls print a message
|
||||||
// to stdout as a reminder to use it only in development.
|
// to stdout as a reminder to use it only in development.
|
||||||
func RegisterDirective(name, before string) {
|
func RegisterDevDirective(name, before string) {
|
||||||
if name == "" {
|
if name == "" {
|
||||||
fmt.Println("[FATAL] Cannot register empty directive name")
|
fmt.Println("[FATAL] Cannot register empty directive name")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|
Loading…
Add table
Reference in a new issue