mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 02:47:48 +08:00
For now, configs specified in `daemon --init-config` and `init CONFIG` are not available. We should fix this eventually but isn't necessary for now (and supporting this will be annoying).
31 lines
471 B
Go
31 lines
471 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/ipfs/go-ipfs/plugin"
|
|
)
|
|
|
|
var Plugins = []plugin.Plugin{
|
|
&testPlugin{},
|
|
}
|
|
|
|
var _ = Plugins // used
|
|
|
|
type testPlugin struct{}
|
|
|
|
func (*testPlugin) Name() string {
|
|
return "test-plugin"
|
|
}
|
|
|
|
func (*testPlugin) Version() string {
|
|
return "0.1.0"
|
|
}
|
|
|
|
func (*testPlugin) Init(env *plugin.Environment) error {
|
|
fmt.Fprintf(os.Stderr, "testplugin %s\n", env.Repo)
|
|
fmt.Fprintf(os.Stderr, "testplugin %v\n", env.Config)
|
|
return nil
|
|
}
|