Exemple #1
0
func (this ByKey) Less(i, j int) bool {
	if v1, ok := this.DataRowSorter[i].GetValue(this.Key); ok {
		if v2, ok := this.DataRowSorter[j].GetValue(this.Key); ok {
			return compute.AsFloat64(v1) < compute.AsFloat64(v2)
		}
	}
	return true
}
Exemple #2
0
func (this *RequestData) GetFloat(key string) float64 {
	if v, ok := this.Param[key]; ok {
		compute.AsFloat64(v)
	}
	return -1
}