title: How to use a flag with two different names (short and long)
body: <p>I am using <a href="https://github.com/spf13/cobra" rel="nofollow noreferrer">https://github.com/spf13/cobra</a> to work with flags.  </p>
  
  <p>I want my CLI to have flag with two names:  <code>-t</code> or <code>--token</code>.  </p>
  
  <p>I currently used it like that:  </p>
  
  <pre><code>rootCmd.PersistentFlags().String("token", "", "Token to insert")  
  </code></pre>
  
  <p>But it prints me the flags like that:  </p>
  
  <pre><code>Flags:
  
        -h, --help           help for myapp
            --token string   Token to insert  
  </code></pre>
  
  <p>I want it to be like that:  </p>
  
  <pre><code>Flags:
  
        -h, --help           help for myapp
        -t, --token string   Token to insert   
  </code></pre>
  
  <p>How can I do it?<br>
  I didn't find it on google, I tried to search for multiple names for a flag but without success.  </p>