Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CMode ¶
type CMode struct {
// contains filtered or unexported fields
}
Example ¶
appLogger := logrus.StandardLogger() cmLogger := logger.New(appLogger) cm := New(appLogger, cmLogger) http.Handle("/", cm.Handler()) err := http.ListenAndServe(":8080", nil) if err != nil { appLogger.Fatalf("Server fatal error - %s", err) }
Output:
type CModeOpt ¶
type CModeOpt interface { Name() string // Should be unique. Used in URL - '/cmode/values?$NAME=OPT_VAL' Get() string // Will be printed in '/cmode/values' ParseAndSet(val string) error // Argument is in ValidValues Description() string // Will be printed in '/cmode' ValidValues() []string // Acceptable values. Used in CMode.usage }
Click to show internal directories.
Click to hide internal directories.