code: func cmdSelfUpdate(params Parameters) *subcommands.Command {
  	return &subcommands.Command{
  		UsageLine: "selfupdate -version <version> | -version-file <path>",
  		ShortDesc: "updates the current CIPD client binary",
  		LongDesc: "Does an in-place upgrade to the current CIPD binary.\n\n" +
  			"Reads the version either from the command line (when using -version) or " +
  			"from a file (when using -version-file). When using -version-file, also " +
  			"loads special *.digests file (from <version-file>.digests path) with " +
  			"pinned hashes of the client binary for all platforms. When selfupdating, " +
  			"the client will verify the new downloaded binary has a hash specified in " +
  			"the *.digests file.",
  		CommandRun: func() subcommands.CommandRun {
  			c := &selfupdateRun{}
  
  			// By default, show a reduced number of logs unless something goes wrong.
  			c.logConfig.Level = logging.Warning
  
  			c.registerBaseFlags()
  			c.clientOptions.registerFlags(&c.Flags, params, withoutRootDir)
  			c.Flags.StringVar(&c.version, "version", "", "Version of the client to update to (incompatible with -version-file).")
  			c.Flags.StringVar(&c.versionFile, "version-file", "",
  				"Indicates the path to read the new version from (<version-file> itself) and "+
  					"the path to the file with pinned hashes of the CIPD binary (<version-file>.digests file).")
  			return c
  		},
  	}
  }
docs: ////////////////////////////////////////////////////////////////////////////////
  // 'selfupdate' subcommand.