Improve type handling in Seq

This commit is contained in:
bep
2015-03-18 11:10:04 +01:00
parent b3bd71fec9
commit e39a258ec4
2 changed files with 5 additions and 1 deletions

View File

@@ -175,6 +175,10 @@ func Seq(args ...interface{}) ([]int, error) {
intArgs := cast.ToIntSlice(args)
if len(intArgs) < 1 || len(intArgs) > 3 {
return nil, errors.New("Invalid argument(s) to Seq")
}
var inc int = 1
var last int
var first = intArgs[0]