You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: version.go
    path of file: ./repos/sealos/cmd/sealos/cmd
    
    the code of the file until where you have to start completion: // Copyright Â© 2021 sealos.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file
    
func newVersionCmd() *cobra.Command {
	var versionCmd = &cobra.Command{
		Use:     "version",
		Short:   "Print version info",
		Args:    cobra.NoArgs,
		Example: `sealos version`,
		RunE: func(cmd *cobra.Command, args []string) error {
			//output default to be yaml
			if output != "yaml" && output != "json" {
				return errors.New(`--output must be 'yaml' or 'json'`)
			}
			if shortPrint {
				fmt.Println(version.Get().String())
				return nil
			}
			return PrintInfo()
		},
	}
	versionCmd.Flags().BoolVar(&shortPrint, "short", false, "if true, print just the version number.")
	versionCmd.Flags().StringVarP(&output, "output", "o", "yaml", "One of 'yaml' or 'json'")
	return versionCmd
}