Skip to content

Commit 880faed

Browse files
authored
Fix documentation for Plugin interface (#3509)
1 parent 4519b93 commit 880faed

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

private/bufpkg/bufplugin/plugin.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,15 @@ type Plugin interface {
3939
OpaqueID() string
4040
// Path returns the path, including arguments, to invoke the binary plugin.
4141
//
42-
// This is not empty only when the plugin is local.
42+
// This is not empty only when the Plugin is local.
4343
Path() []string
44-
// FullName returns the FullName of the Plugin.
44+
// FullName returns the full name of the Plugin.
4545
//
46-
// This is nil
46+
// May be nil. Callers should not rely on this value being present.
47+
// However, this is always present for remote Plugins.
48+
//
49+
// At least one of FullName or Path will always be present. Use OpaqueID
50+
// as an always-present identifier.
4751
FullName() bufparse.FullName
4852
// CommitID returns the BSR ID of the Commit.
4953
//
@@ -78,7 +82,7 @@ type Plugin interface {
7882
Data() ([]byte, error)
7983
// IsWasm returns true if the Plugin is a Wasm Plugin.
8084
//
81-
// Plugins are either Wasm or not Wasm.
85+
// Plugins are either Wasm or local.
8286
//
8387
// A Wasm Plugin is a Plugin that is a Wasm module. Wasm Plugins are invoked
8488
// with the wasm.Runtime. The Plugin will have Data and will be able to

0 commit comments

Comments
 (0)