Commit 0c57748b authored by Miek Gieben's avatar Miek Gieben

Rename RegisterDirective to RegisterDevDirective

There is no good reason to be different than Caddy and allows us to
piggyback on it's documentation.
parent 7db3511e
...@@ -6,9 +6,10 @@ import ( ...@@ -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 ( ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment