pulumi/cmd/get.go
joeduffy 14c040bc7f Implement custom decoding of ModuleMembers
This change begins to implement some of the AST custom decoding, beneath
the Package's Module map.  In particular, we now unmarshal "one level"
beyond this, populating each Module's ModuleMember map.  This includes
Classes, Exports, ModuleProperties, and ModuleMethods.  The Class AST's
Members have been marked "custom", in addition to Block's Statements,
because they required kind-directed decoding.  But Exports and
ModuleProperties can be decoded entirely using the tag-directed decoding
scheme.  Up next, custom decoding of ClassMembers.  At that point, all
definition-level decoding will be done, leaving MuIL's ASTs.
2017-01-15 14:57:42 -08:00

34 lines
918 B
Go

// Copyright 2016 Marapongo, Inc. All rights reserved.
package cmd
import (
"github.com/spf13/cobra"
"github.com/marapongo/mu/pkg/util/contract"
)
func newGetCmd() *cobra.Command {
var global bool
var save bool
var cmd = &cobra.Command{
Use: "get [deps]",
Short: "Download a Mu Stack",
Long: "Get downloads a Mu Stack by name. If run without arguments, get will attempt\n" +
"to download dependencies referenced by the current Stack. Otherwise, if one\n" +
"or more specific dependencies are provided, only those will be downloaded.",
Run: func(cmd *cobra.Command, args []string) {
contract.FailM("Get command is not yet implemented")
},
}
cmd.PersistentFlags().BoolVarP(
&global, "global", "g", false,
"Install to a shared location on this machine")
cmd.PersistentFlags().BoolVarP(
&save, "save", "s", false,
"Save new dependencies in the current Mu Stack")
return cmd
}