[go-nuts] Re: json unmarshalling troubles

2021-06-03 Thread natxo....@gmail.com
hi all, thanks for your insights. The Value interface{} type does work nicely. I had tried as well the map[string]interface{} route, and it works as well, so now I have two solutions which is kind of a luxury position. Regards, Natxo On Thursday, June 3, 2021 at 7:41:21 AM UTC+2 Amnon wrote

[go-nuts] json unmarshalling troubles

2021-06-02 Thread natxo....@gmail.com
hi, I have this json back from an api: { "all_parameters": [{ "priority": 60, "created_at": "2021-06-02 12:15:13 UTC", "updated_at": "2021-06-02 12:15:13 UTC", "id": 28, "name": "network_interface_mapping", "parameter_typ

[go-nuts] Re: unpacking map[string]interface{} answer

2021-05-31 Thread natxo....@gmail.com
Compute_attributes.Corespersocket m string ~Compute_attributes.Cpus m string ~Compute_attributes.Start m string Thanks for your pointer. Regards, Natxo On Monday, May 31, 2021 at 6:45:36 AM UTC+2 natxo@gmail.com wrote: > hi, > > I

[go-nuts] Re: unpacking map[string]interface{} answer

2021-05-30 Thread natxo....@gmail.com
rr) } fmt.Printf("%T\n", resp) and the result is: map[string]interface {} so this is my problem, I don't know what for type in resp is :?. I'll take a look a the external library.. Thanks! On Monday, May 31, 2021 at 12:47:36 AM UTC+2 natxo@gmail.com wrot

[go-nuts] unpacking map[string]interface{} answer

2021-05-30 Thread natxo....@gmail.com
hi, I am struggling to understand how to use this map[string]interface{}. snippet: package main import "fmt" import "github.com/mattwilmott/go-foreman" func main() { client := foreman.Client("foreman.l.example.org", "admin", "whatever", false, "") fmt.Println(client) resp, err :=

Re: [go-nuts] problems using external modules with go 1.16.4

2021-05-07 Thread natxo....@gmail.com
On Friday, May 7, 2021 at 3:34:14 PM UTC+2 Jan Mercl wrote: > On Fri, May 7, 2021 at 3:21 PM natxo....@gmail.com > wrote: > > > I do not want to write a module, I just want to use a module. So how do > I do this? I am reading all the tutorials listed on the go help modules

[go-nuts] problems using external modules with go 1.16.4

2021-05-07 Thread natxo....@gmail.com
hi, I am struggling with the new go version. I have a simple script that imports a github module, and before (don't know which go version) I could just run: go get github/user/module and then in my crappy script I could package main import github.com/user/module func main() { p := module