tags:

views:

81

answers:

1

if i try to access key in array which does not exist i get throw: index out of range with a stacktrace.

How do i check if tmp[key] "is set" ?

A: 

This accualy works:

if len(url) > 1 {
    tmp := strings.Split(url[1],"=",0);
    if len(tmp) >1{
        sess = tmp[1];
    }
}
jonaz
This is the only thing which will work I think. I don't think there is any way to get some kind of "out of range" exception from Go.
Kinopiko