Files
zeekay fa64f27ed2 fix(lint): replace magic strings with constants for goconst compliance
Add package-level constants for repeated string literals across the codebase:
- LuxEVMName in deploy.go for VM naming
- MainnetSubnetBlockchainID in start_with_state.go
- PChainID in chain/config.go
- pqSuffix, schemeLSAG, schemeLattice, schemeLatticeFull, schemeLatticePQ in keycmd
- rentalPlan* and validatorMgmtHybrid in l1cmd/migrate.go
- vmType* constants in l3cmd/create.go
- networkTypeCustom, networkTypeLocal in networkcmd
- vmNameEVM, orgLuxfi in vmcmd
- WalletConnectName in key package
- platformDarwin in backend_test.go
- strTrue in e2e tests

This addresses all goconst linter warnings requiring string literals
with 3+ occurrences to be defined as constants.
2026-01-02 05:05:58 -08:00

39 lines
1010 B
Go

// Copyright (C) 2022-2025, Lux Industries, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
// Package vmcmd provides commands for managing VM plugins.
package vmcmd
import (
"github.com/luxfi/cli/pkg/application"
"github.com/luxfi/cli/pkg/cobrautils"
"github.com/spf13/cobra"
)
// NewCmd creates the vm command suite.
func NewCmd(_ *application.Lux) *cobra.Command {
cmd := &cobra.Command{
Use: "vm",
Short: "Manage VM plugins",
Long: `Commands for installing, linking, and managing VM plugins.
VM plugins are stored as symlinks in ~/.lux/plugins/<vmid>.
The VMID is calculated from the VM name (padded to 32 bytes, CB58 encoded).
Examples:
lux vm link lux-evm --path ~/work/lux/evm/build/evm
lux vm status
lux vm unlink lux-evm
lux vm reload`,
RunE: cobrautils.CommandSuiteUsage,
}
cmd.AddCommand(newInstallCmd())
cmd.AddCommand(newLinkCmd())
cmd.AddCommand(newStatusCmd())
cmd.AddCommand(newUnlinkCmd())
cmd.AddCommand(newReloadCmd())
return cmd
}