Skip to content

Instantly share code, notes, and snippets.

@dougluce
Created February 21, 2016 22:30
Show Gist options
  • Save dougluce/e4b3669f76285646e8f5 to your computer and use it in GitHub Desktop.
Save dougluce/e4b3669f76285646e8f5 to your computer and use it in GitHub Desktop.
otto parser test
package main
import (
"fmt"
"time"
"github.com/robertkrimen/otto/parser"
)
func main () {
filename := "/tmp/addthis_widget.js"
start := time.Now()
_, err := parser.ParseFile(nil, filename, nil, 0)
elapsed := time.Since(start)
fmt.Printf("Parsed in %s", elapsed)
if err != nil {
fmt.Println(err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment