github.com/fastly/cli@v1.7.2-0.20240304164155-9d0f1d77c3bf/pkg/commands/service/root.go (about)

     1  package service
     2  
     3  import (
     4  	"io"
     5  
     6  	"github.com/fastly/cli/pkg/argparser"
     7  	"github.com/fastly/cli/pkg/global"
     8  )
     9  
    10  // RootCommand is the parent command for all subcommands in this package.
    11  // It should be installed under the primary root command.
    12  type RootCommand struct {
    13  	argparser.Base
    14  	// no flags
    15  }
    16  
    17  // NewRootCommand returns a new command registered in the parent.
    18  func NewRootCommand(parent argparser.Registerer, g *global.Data) *RootCommand {
    19  	var c RootCommand
    20  	c.Globals = g
    21  	c.CmdClause = parent.Command("service", "Manipulate Fastly services")
    22  	return &c
    23  }
    24  
    25  // Exec implements the command interface.
    26  func (c *RootCommand) Exec(_ io.Reader, _ io.Writer) error {
    27  	panic("unreachable")
    28  }