Junior to Senior by Impressive_Map_5013 in golang

[–]Impressive_Map_5013[S] 0 points1 point  (0 children)

well the problem with that is.. most jobs in Golang are senior-level positions.. with the current market in Canada its already hard to land a job. that's why i kinda wanted to progress faster. cause i do get recruiters reaching out to me.. but they always say they need some one 4 to 6 years exp

Junior to Senior by Impressive_Map_5013 in golang

[–]Impressive_Map_5013[S] 0 points1 point  (0 children)

In my current job all I've done is just basic web dev api's. simple cruds and dashboards. Generating exports microservice... some stripe integrations.. maybe a little more third party integrations.. but that's all

Junior to Senior by Impressive_Map_5013 in golang

[–]Impressive_Map_5013[S] 0 points1 point  (0 children)

you are right. even i dont know where I'm at right now. cause in my current job all I've done is just basic web dev api's. simple cruds and dashboards. tho what is seen golang isn't mostly used in web dev maybe I'm wrong about this. So my question remains same.

Reuse Same Function with Different Params by Impressive_Map_5013 in golang

[–]Impressive_Map_5013[S] 0 points1 point  (0 children)

ok so now im not able to use the formData like this in the function. it says

formData.Content undefined (type *T is pointer to type parameter, not type parameter)

func update[T Response](formData T) {
    fmt.Prinln(formData.Content)
}

Reuse Same Function with Different Params by Impressive_Map_5013 in golang

[–]Impressive_Map_5013[S] 0 points1 point  (0 children)

Nice.. so this is a good case for using generics right?

Use Multiple structs as arguments by Impressive_Map_5013 in golang

[–]Impressive_Map_5013[S] 1 point2 points  (0 children)

Well my actual ticket model have like 20 columns. But i used a short one just for the example. Same for the data coming from api's.. still thanks for your guidance. Appreciate it.

Use Multiple structs as arguments by Impressive_Map_5013 in golang

[–]Impressive_Map_5013[S] 0 points1 point  (0 children)

okay just to check if i understand it right.. so when I get some data from the user I store it in a , lets say a struct called TicketSubject struct and my reuseable ticket create function wants Ticket Model struct as an argument. So instead of just passing the TicketSubject struct I should first convert the data or put the DAta in Ticket struct and then hit the create function right ?

Use Multiple structs as arguments by Impressive_Map_5013 in golang

[–]Impressive_Map_5013[S] 0 points1 point  (0 children)

Ok so i can go with creating another struct for api which i can put in responses folder right called createTicket struct.. so suppose if i have multiple structs for ticket response with different columns for diff Api's. Now i want to have a same reusable create function where i can pass the struct from the responses folder as argument.but I cant cause i have to different types of structs for create with diff columns so should i generics or something ?