frostfs-node/cmd/frostfs-lens/internal/blobovnicza/root.go
Dmitrii Stepanov 62b5181618
[#1437] blobovnicza: Fix contextcheck linter
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-11-13 10:36:08 +03:00

33 lines
713 B
Go

package blobovnicza
import (
common "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-lens/internal"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobovnicza"
"github.com/spf13/cobra"
)
var (
vAddress string
vPath string
vOut string
)
// Root contains `blobovnicza` command definition.
var Root = &cobra.Command{
Use: "blobovnicza",
Short: "Operations with a blobovnicza",
}
func init() {
Root.AddCommand(listCMD, inspectCMD, tuiCMD)
}
func openBlobovnicza(cmd *cobra.Command) *blobovnicza.Blobovnicza {
blz := blobovnicza.New(
blobovnicza.WithPath(vPath),
blobovnicza.WithReadOnly(true),
)
common.ExitOnErr(cmd, blz.Open(cmd.Context()))
return blz
}