On Tue, Aug 22, 2017 at 11:09 AM, Tong Sun wrote:
> First of all, thanks a lot for your solution andrey!
>
> Let me explain what I'm trying to do --- I'm trying to covert my struct
> into map with github.com/fatih/structs
> https://groups.google.com/d/msg/golang-nuts/eyYnelZF1zo/Z0IPBcArCwAJ
>
>
First of all, thanks a lot for your solution andrey!
Let me explain what I'm trying to do --- I'm trying to covert my struct
into map with github.com/fatih/structs
https://groups.google.com/d/msg/golang-nuts/eyYnelZF1zo/Z0IPBcArCwAJ
but the following gave me "panic: not struct"
type Server stru
On Tue, Aug 22, 2017 at 07:38:03AM -0700, Tong Sun wrote:
> How to initialize a go struct like the following?
>
> type Server struct {
> Namestring
> ID int32
> Enabled bool
> }
This type definition looks pretty much OK.
> s := struct {
> Servers []Server{
> {
>
On Tue, Aug 22, 2017 at 4:38 PM Tong Sun wrote:
https://play.golang.org/p/mKdRevvsH0
--
-j
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubs
It's not immediately obvious what you're trying to do, but here's one
possible solution: https://play.golang.org/p/wrrDlvDISq
On Tue, Aug 22, 2017 at 8:38 AM, Tong Sun wrote:
> Hi,
>
> How to initialize a go struct like the following?
>
> type Server struct {
> Namestring
> ID int32
>