title: variable declared but not used
body: <p>I have tried different strategies to no avail. Following code in <code>vscode</code> shows variable  declared but not used for <code>year</code>, <code>month</code> and <code>day</code> while they are used in casting (last 3 lines of code):</p>
  <pre><code>var year, month, day int
  year = -1
  month = -1
  day = -1
  // Calculate Year Month Day
  if eventCalendar == &quot;gregorian&quot; {
      s := strings.Split(&quot;eventDate&quot;, &quot;/&quot;)
      year, err := strconv.Atoi(s[0])
      if err != nil {
          log.Fatal(&quot;Cannot convert year to integer: &quot; + s[0] + &quot;. &quot; + err.Error())
      }
      month, err := strconv.Atoi(s[1])
      if err != nil {
          log.Fatal(&quot;Cannot convert month to integer: &quot; + s[1] + &quot;. &quot; + err.Error())
      }
      day, err := strconv.Atoi(s[2])
      if err != nil {
          log.Fatal(&quot;Cannot convert day to integer: &quot; + s[2] + &quot;. &quot; + err.Error())
      }
  } else if eventCalendar == &quot;jalali&quot; {
      s := strings.Split(&quot;eventDate&quot;, &quot;-&quot;)
      year, err := strconv.Atoi(s[0])
      if err != nil {
          log.Fatal(&quot;Cannot convert year to integer: &quot; + s[0] + &quot;. &quot; + err.Error())
      }
      month, err := strconv.Atoi(s[1])
      if err != nil {
          log.Fatal(&quot;Cannot convert month to integer: &quot; + s[1] + &quot;. &quot; + err.Error())
      }
      day, err := strconv.Atoi(s[2])
      if err != nil {
          log.Fatal(&quot;Cannot convert day to integer: &quot; + s[2] + &quot;. &quot; + err.Error())
      }
      // TODO: Convert to gregorian
  } else {
      panic(&quot;Unknown calendar type: eventcalendar&quot;)
  }
  strYear := strconv.Itoa(year)
  strMonth := strconv.Itoa(month)
  strDay := strconv.Itoa(day)
  </code></pre>
  <p>// ... rest of code</p>