@@ -45,10 +45,10 @@ import (
4545 imagev1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1"
4646 "github.com/bufbuild/buf/private/pkg/git"
4747 "github.com/bufbuild/buf/private/pkg/httpauth"
48- "github.com/bufbuild/buf/private/pkg/ioext"
4948 "github.com/bufbuild/buf/private/pkg/normalpath"
5049 "github.com/bufbuild/buf/private/pkg/protoencoding"
51- "github.com/bufbuild/buf/private/pkg/slicesext"
50+ "github.com/bufbuild/buf/private/pkg/standard/xio"
51+ "github.com/bufbuild/buf/private/pkg/standard/xslices"
5252 "github.com/bufbuild/buf/private/pkg/storage/storageos"
5353 "github.com/bufbuild/buf/private/pkg/syserror"
5454 "github.com/bufbuild/buf/private/pkg/wasm"
@@ -726,7 +726,7 @@ func (c *controller) GetMessage(
726726 if err != nil {
727727 return nil , 0 , err
728728 }
729- data , err := ioext .ReadAllAndClose (readCloser )
729+ data , err := xio .ReadAllAndClose (readCloser )
730730 if err != nil {
731731 return nil , 0 , err
732732 }
@@ -1205,13 +1205,13 @@ func (c *controller) warnUnconfiguredTransitiveImports(
12051205 // First, figure out if we have a local module. If we don't, just return - the Workspace
12061206 // was purely built from remote Modules, and therefore buf.yaml configured dependencies
12071207 // do not apply.
1208- if slicesext .Count (workspace .Modules (), bufmodule .Module .IsLocal ) == 0 {
1208+ if xslices .Count (workspace .Modules (), bufmodule .Module .IsLocal ) == 0 {
12091209 return nil
12101210 }
12111211 // Construct a struct map of all the FullName strings of the configured buf.yaml
12121212 // Module dependencies, and the local Modules. These are considered OK to depend on
12131213 // for non-imports in the Image.
1214- configuredFullNameStrings , err := slicesext .MapError (
1214+ configuredFullNameStrings , err := xslices .MapError (
12151215 workspace .ConfiguredDepModuleRefs (),
12161216 func (moduleRef bufparse.Ref ) (string , error ) {
12171217 moduleFullName := moduleRef .FullName ()
@@ -1224,7 +1224,7 @@ func (c *controller) warnUnconfiguredTransitiveImports(
12241224 if err != nil {
12251225 return err
12261226 }
1227- configuredFullNameStringMap := slicesext .ToStructMap (configuredFullNameStrings )
1227+ configuredFullNameStringMap := xslices .ToStructMap (configuredFullNameStrings )
12281228 for _ , localModule := range bufmodule .ModuleSetLocalModules (workspace ) {
12291229 if moduleFullName := localModule .FullName (); moduleFullName != nil {
12301230 configuredFullNameStringMap [moduleFullName .String ()] = struct {}{}
@@ -1314,7 +1314,7 @@ func getImageFileInfosForModuleSet(ctx context.Context, moduleSet bufmodule.Modu
13141314 if err != nil {
13151315 return nil , err
13161316 }
1317- return slicesext .Map (
1317+ return xslices .Map (
13181318 fileInfos ,
13191319 func (fileInfo bufmodule.FileInfo ) bufimage.ImageFileInfo {
13201320 return bufimage .ImageFileInfoForModuleFileInfo (fileInfo )
@@ -1478,15 +1478,15 @@ func newStaticPluginKeyProviderForPluginConfigs(
14781478 pluginKeys []bufplugin.PluginKey ,
14791479) (_ bufplugin.PluginKeyProvider , retErr error ) {
14801480 // Validate that all remote PluginConfigs are present in the buf.lock file.
1481- pluginKeysByFullName , err := slicesext .ToUniqueValuesMap (pluginKeys , func (pluginKey bufplugin.PluginKey ) string {
1481+ pluginKeysByFullName , err := xslices .ToUniqueValuesMap (pluginKeys , func (pluginKey bufplugin.PluginKey ) string {
14821482 return pluginKey .FullName ().String ()
14831483 })
14841484 if err != nil {
14851485 return nil , fmt .Errorf ("failed to validate remote PluginKeys: %w" , err )
14861486 }
14871487 // Remote PluginConfig Refs are any PluginConfigs that have a Ref.
1488- remotePluginRefs := slicesext .Filter (
1489- slicesext .Map (pluginConfigs , func (pluginConfig bufconfig.PluginConfig ) bufparse.Ref {
1488+ remotePluginRefs := xslices .Filter (
1489+ xslices .Map (pluginConfigs , func (pluginConfig bufconfig.PluginConfig ) bufparse.Ref {
14901490 return pluginConfig .Ref ()
14911491 }),
14921492 func (pluginRef bufparse.Ref ) bool {
0 commit comments