<commit_before>package ms

import (
	"encoding/json"
	"errors"
	"github.com/kuzzleio/sdk-go/types"
	"fmt"
	"strconv"
)

/*
  Return the longitude/latitude values for the provided key's members
*/
func (ms Ms) Geopos(key string, members []string, options types.QueryOptions) ([][]float64, error) {
	if key == "" {
		return nil, errors.New("Ms.Geopos: key required")
	}

	result := make(chan types.KuzzleResponse)

	query := types.KuzzleRequest{
		Controller: "ms",
		Action:     "geopos",
		Id: 				key,
		Members:    members,
	}
	go ms.Kuzzle.Query(query, nil, result)

	res := <-result

	fmt.Println(string(res.Result))

	if res.Error.Message != "" {
		return nil, errors.New(res.Error.Message)
	}
	var stringResults [][]string
	json.Unmarshal(res.Result, &stringResults)

	var returnedResults [][]float64

	for i := 0; i < len(stringResults); i++ {
		for j := 0; j < 2; j++ {
			tmp, err := strconv.ParseFloat(stringResults[j][0], 64)
			if err != nil {
				return nil, err
			}
			returnedResults[j][0] = tmp
		}
	}

	return returnedResults, nil
}<commit_msg>WIP Method geopos.go<commit_after>package ms

import (
	"encoding/json"
	"errors"
	"github.com/kuzzleio/sdk-go/types"
	"strconv"
)

/*
  Return the longitude/latitude values for the provided key's members
*/
func (ms Ms) Geopos(key string, members []string, options types.QueryOptions) ([][]float64, error) {
	if key == "" {
		return nil, errors.New("Ms.Geopos: key required")
	}

	result := make(chan types.KuzzleResponse)

	query := types.KuzzleRequest{
		Controller: "ms",
		Action:     "geopos",
		Id: 				key,
		Members:    members,
	}
	go ms.Kuzzle.Query(query, nil, result)

	res := <-result

	if res.Error.Message != "" {
		return nil, errors.New(res.Error.Message)
	}
	var stringResults [][]string
	json.Unmarshal(res.Result, &stringResults)

	returnedResults := make([][]float64, len(stringResults))

	for i := 0; i < len(stringResults); i++ {
		returnedResults[i] = make([]float64, 2)
		for j := 0; j < 2; j++ {
			tmp, err := strconv.ParseFloat(stringResults[i][j], 64)
			if err != nil {
				return nil, err
			}
			returnedResults[i][j] = tmp
		}
	}

	return returnedResults, nil
}
{'fraction_non_alphanumeric': 0.15855354659248957, 'fraction_numerical': 0.010662957811775614, 'mean_word_length': 3.6913043478260867, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4172020', 'n_tokens_mistral': 874, 'n_tokens_neox': 788, 'n_words': 193}