title: Golang - Comparison operator not defined on interface converted to float64
body: <p>As shown in the code below, I'm doing some type switching on an <code>interface{}</code> in order to do the correct type switching - I'm trying to convert the <code>interface{}</code> to either a <code>float64</code> or a <code>string</code> and then comparing it to a value, however, when using a comparison operator other than <code>==</code> on the <code>float64</code>'s, Go complains about it when building.</p>
  
  <p>The errors Go spits out are as follows :-</p>
  
  <pre><code>invalid operation: (interface {})(val.(float64)) &gt; subval.Value (operator &gt; not defined on interface)
  invalid operation: (interface {})(val.(float64)) &gt;= subval.Value (operator &gt;= not defined on interface)
  invalid operation: (interface {})(val.(float64)) &lt; subval.Value (operator &lt; not defined on interface)
  invalid operation: (interface {})(val.(float64)) &lt;= subval.Value (operator &lt;= not defined on interface)
  </code></pre>
  
  <p>...and this is my code:-</p>
  
  <pre><code>val:= s.FieldByName(subval.Metric).Interface()
  switch val(type) {
  case float64, float32, int:
      switch subval.Type {
      case "greater_than":
          if val.(float64) &gt; subval.Value {
              runAction(subval.Action, Config)
          }
      case "greater_than_or_equal_to":
          if val.(float64) &gt;= subval.Value {
              runAction(subval.Action, Config)
          }
      case "equal_to":
          if val.(float64) == subval.Value {
              runAction(subval.Action, Config)
          }
      case "less_than":
          if val.(float64) &lt; subval.Value {
              runAction(subval.Action, Config)
          }
      case "less_than_or_equal_to":
          if val.(float64) &lt;= subval.Value {
              runAction(subval.Action, Config)
          }
      }
  case string:
      if subval.Type == "equal_to" {
          if val.(string) == subval.Value {
              runAction(subval.Action, Config)
          }
      }
  }
  </code></pre>