papigoplug

command module
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 2 Imported by: 0

README

papigoplug

Go plugin utilities for the process-api. Equivalent to the Python implementation at https://github.com/Dewberry/papipyplug

Usage

Any program leveraging papigoplug must initialize its log before invoking other papigoplug functions. Otherwise the program will panic with a generic message when papigoplug tries to call log methods against a nil pointer. InitLog() must be called once only. Calling it a second time will cause a Log.Fatal() indicating that the log has already been initialized.

After initializing the log, it can be accessed like papigoplug.Log.Info("hello, world!")

package main

import (
    papigoplug "github.com/Dewberry/papigoplug/papigoplug"
)

func main() {
    papigoplug.InitLog("info")
    // Now it's safe to call other papigoplug functions that might use Log.
}

See example.go and papigoplug_test/papigoplug_test.go for usage details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL