( ctx context.Context, container appext.Container, )
| 48 | } |
| 49 | |
| 50 | func run( |
| 51 | ctx context.Context, |
| 52 | container appext.Container, |
| 53 | ) error { |
| 54 | dirPath := "." |
| 55 | if container.NumArgs() > 0 { |
| 56 | dirPath = container.Arg(0) |
| 57 | } |
| 58 | controller, err := bufcli.NewController(container) |
| 59 | if err != nil { |
| 60 | return err |
| 61 | } |
| 62 | workspaceDepManager, err := controller.GetWorkspaceDepManager(ctx, dirPath) |
| 63 | if err != nil { |
| 64 | return err |
| 65 | } |
| 66 | configuredRemotePluginRefs, err := workspaceDepManager.ConfiguredRemotePluginRefs(ctx) |
| 67 | if err != nil { |
| 68 | return err |
| 69 | } |
| 70 | return prune( |
| 71 | ctx, |
| 72 | xslices.Map( |
| 73 | configuredRemotePluginRefs, |
| 74 | func(pluginRef bufparse.Ref) string { |
| 75 | return pluginRef.FullName().String() |
| 76 | }, |
| 77 | ), |
| 78 | workspaceDepManager, |
| 79 | ) |
| 80 | } |
| 81 | |
| 82 | func prune( |
| 83 | ctx context.Context, |
no test coverage detected