From 27c2537e66e7cd094e05e99e20a821e942bc4608 Mon Sep 17 00:00:00 2001 From: Edward McFarlane Date: Wed, 11 Dec 2024 00:23:18 +0000 Subject: [PATCH] Update docs --- private/bufpkg/bufconfig/plugin_config.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/private/bufpkg/bufconfig/plugin_config.go b/private/bufpkg/bufconfig/plugin_config.go index 967e4f611b..c45e44f1e6 100644 --- a/private/bufpkg/bufconfig/plugin_config.go +++ b/private/bufpkg/bufconfig/plugin_config.go @@ -43,8 +43,12 @@ type PluginConfig interface { Type() PluginConfigType // Name returns the plugin name. // - // This may be a path, a remote reference, or a Wasm file. Invoking code - // should check the Type to determine how to interpret this. + // If the plugin is of Type PluginConfigTypeLocal, the Name is the command + // name or path to the command. + // If the plugin is of Type PluginConfigTypeLocalWasm, the Name is the + // path to the Wasm file. It must end with .wasm. + // If the plugin is of Type PluginConfigTypeRemoteWasm, the Name is a + // vaild bufparse.Ref and Ref returns the plugin reference. // // This is never empty. Name() string @@ -53,7 +57,7 @@ type PluginConfig interface { // TODO: Will want good validation and good error messages for what this decodes. // Otherwise we will confuse users. Do QA. Options() map[string]any - // Args returns the arguments, to invoke the plugin. + // Args returns the arguments, excluding the name, for the plugin. // // This may be empty. Args() []string