title: Unexpected int at end of statement
body: <p>I'm struggling a bit with this piece of Go code. I have been searching all over the place, but can't understand what is wrong about it.</p>
  
  <p>Error message is: syntax error: unexpected int at end of statement</p>
  
  <p>for that line near the bottom: <code>func (TOHLCV TOHLCVs) Len() int {</code></p>
  
  <p>I also have this error message for the second to the last line of code:</p>
  
  <pre><code>syntax error: non-declaration statement outside function body
  </code></pre>
  
  <p>In case the 2 errors are related</p>
  
  <pre><code>package main
  
  import (
      "fmt"
      "time"
      "strconv"
  
      //from https://github.com/pplcc/plotext/
      "log"
      "os"
  
      "github.com/360EntSecGroup-Skylar/excelize"
      "github.com/pplcc/plotext/custplotter"
      "gonum.org/v1/plot"
      "github.com/pplcc/plotext"
      "gonum.org/v1/plot/vg/vgimg"
      "gonum.org/v1/plot/vg/draw"
  )
  
      // Len implements the Len method of the TOHLCVer interface.
      func (TOHLCV TOHLCVs) Len() int {
          return len(TOHLCV)
  
  func main() {
  
  //read excel file******************************************
      xlsx, err := excelize.OpenFile("/media/Snaps/test snaps.xlsm")
      if err != nil {
          fmt.Println(err)
          return
      }
  
      //read all rows into df
      df := xlsx.GetRows("ticker_2")
  
      type TOHLCVer interface {
          // Len returns the number of time, open, high, low, close, volume tuples.
          Len() int
  
          // TOHLCV returns an time, open, high, low, close, volume tuple.
          TOHLCV(int) (float64, float64, float64, float64, float64, float64)
      }
  
      type TOHLCVs []struct{ T, O, H, L, C, V float64 }
  
      // Len implements the Len method of the TOHLCVer interface.
      func (TOHLCV TOHLCVs) Len() int {
          return len(TOHLCV)
      }
  
      df3 := make(TOHLCVs, 60) // create slice for 60 rows
      idx := 0
  </code></pre>
  
  <p>this code is adapted from:
  <a href="https://github.com/pplcc/plotext/blob/master/custplotter/tohlcv.go" rel="nofollow noreferrer">https://github.com/pplcc/plotext/blob/master/custplotter/tohlcv.go</a></p>