# README
package initialize
import ( "fmt" "os"
"github.com/spf13/cobra"
"github.com/gomicro/micro/readme"
)
func init() { InitializeCmd.AddCommand(ReadmeCmd) funcs = append(funcs, readmeFunc) }
// ReadmeCmd represents the command that executes all of tasks for bootstrapping // a Readme var ReadmeCmd = &cobra.Command{ Use: "readme", Short: "Initialize a Readme file", Run: readmeFunc, }
func readmeFunc(cmd *cobra.Command, args []string) { r := readme.New(name, source) if installable { r.EnableInstallable() }
err := r.WriteFile()
if err != nil {
fmt.Println(err.Error())
os.Exit(1)
}
}
# Variables
AckrcCmd represents the command that executes all of tasks for bootstrapping a .ackrc.
DockercomposeCmd represents the command that executes all of tasks for bootstrapping a Dockercompose.
DockerfileCmd represents the command that executes all of tasks for bootstrapping a Dockerfile.
GitignoreCmd represents the command that executes all of tasks for bootstrapping a Gitignore.
GofilesCmd represents the command that executes all of tasks for bootstrapping the Go files.
InitializeCmd executes all of the initialize commands together rather than as individual commands.
LicenseCmd represents the command that executes all of tasks for bootstrapping a License.
MakefileCmd represents the command that executes all of tasks for bootstrapping a Makefile.
ReadmeCmd represents the command that executes all of tasks for bootstrapping a Readme.