code: func NewCmdServiceAccount(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command {
  	o := NewSetServiceAccountOptions(streams)
  
  	cmd := &cobra.Command{
  		Use:                   "serviceaccount (-f FILENAME | TYPE NAME) SERVICE_ACCOUNT",
  		DisableFlagsInUseLine: true,
  		Aliases:               []string{"sa"},
  		Short:                 i18n.T("Update ServiceAccount of a resource"),
  		Long:                  serviceaccountLong,
  		Example:               serviceaccountExample,
  		Run: func(cmd *cobra.Command, args []string) {
  			cmdutil.CheckErr(o.Complete(f, cmd, args))
  			cmdutil.CheckErr(o.Run())
  		},
  	}
  
  	o.PrintFlags.AddFlags(cmd)
  	o.RecordFlags.AddFlags(cmd)
  
  	usage := "identifying the resource to get from a server."
  	cmdutil.AddFilenameOptionFlags(cmd, &o.fileNameOptions, usage)
  	cmd.Flags().BoolVar(&o.all, "all", o.all, "Select all resources, including uninitialized ones, in the namespace of the specified resource types")
  	cmd.Flags().BoolVar(&o.local, "local", o.local, "If true, set serviceaccount will NOT contact api-server but run locally.")
  	cmdutil.AddDryRunFlag(cmd)
  	cmdutil.AddIncludeUninitializedFlag(cmd)
  	return cmd
  }
docs: // NewCmdServiceAccount returns the "set serviceaccount" command.