mirror of
https://github.com/sablierapp/sablier.git
synced 2025-12-21 13:23:03 +01:00
30 lines
722 B
Go
30 lines
722 B
Go
package sabliercmd
|
|
|
|
import (
|
|
"github.com/sablierapp/sablier/pkg/config"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// NewStartCommand is a variable that allows mocking the start command for testing
|
|
var NewStartCommand = newStartCommand
|
|
|
|
// SetStartCommand allows tests to override the start command
|
|
func SetStartCommand(cmd func() *cobra.Command) {
|
|
newStartCommand = cmd
|
|
}
|
|
|
|
// ResetStartCommand resets the start command to the default
|
|
func ResetStartCommand() {
|
|
newStartCommand = NewStartCommand
|
|
}
|
|
|
|
// GetConfig returns the current configuration (for testing)
|
|
func GetConfig() *config.Config {
|
|
return &conf
|
|
}
|
|
|
|
// ResetConfig resets the configuration to a new instance (for testing)
|
|
func ResetConfig() {
|
|
conf = config.NewConfig()
|
|
}
|