logo-MindMajix
PostGoLangGoLang
c
cayrel rings

Posted on 23rd June 2024|74 views

0
votes

Golang Array Of Structs

How do you init array of structs in Go?

1 answers
Answers
P
sreelu 123

Posted on 23rd June 2024| views

Try this example 

Var opts = [] struct

{

shortnm bytes

longnm, help string

needArg bool

}{

{'x', "multiple", "Usage for a", false},

{ shortnm: 'y', 

longnm: "y-option", 

needArg: false, 

help: "Use of y", }, }

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo

  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos
Name
Course *
Email *
Phone Number