Skip to content

Commit

Permalink
use filepath.Ext
Browse files Browse the repository at this point in the history
  • Loading branch information
emcfarlane committed Oct 2, 2024
1 parent 41705f9 commit 4bfc10c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion private/bufpkg/bufconfig/plugin_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package bufconfig
import (
"errors"
"fmt"
"path/filepath"
"strings"

"github.com/bufbuild/buf/private/pkg/encoding"
Expand Down Expand Up @@ -115,7 +116,7 @@ func newPluginConfigForExternalV2(
return nil, errors.New("must specify a path to the plugin")
}
// Wasm plugins are suffixed with .wasm. Otherwise, it's a binary.
if strings.HasSuffix(path[0], ".wasm") {
if filepath.Ext(path[0]) == ".wasm" {
return newLocalWasmPluginConfig(
strings.Join(path, " "),
options,
Expand Down

0 comments on commit 4bfc10c

Please sign in to comment.