title: How to get current hour and minutes in two digit using go?
body: <p>I'm using time package in go for taking the time into string but there is a problem is that when the time is <code>9:00 AM or 10:00 AM</code> then the below code will output for 9:00AM is <code>90</code> and for 10:00AM is <code>100</code> but if there is time <code>9:11AM or 10:11AM</code> then the output for 9:11AM is <code>911</code> and for 10:11AM is <code>1011</code> The problem is if there is 10:00AM then it will give the minutes in two digits number not in single single digit. The code I'm using is </p>
  
  <pre><code>hours, minutes, _ := time.Now().Clock()
  fmt.Println(hours, minutes)
  </code></pre>
  
  <p>I want that it will produce the result in two digit like <code>10:00AM</code> then it will give <code>1000</code> and if there is <code>10:11AM</code> then it will give me <code>1011</code>.</p>
  
  <p>Basically I want to convert them into the string using:-</p>
  
  <pre><code> currUTCTimeInString := strconv.Itoa(hours) + strconv.Itoa(minutes)
  </code></pre>
  
  <p>Can anybody help me for this.</p>