Tap to unmute

Creating routes and testing API in golang

  Рет қаралды 16,606

Hitesh Choudhary

Hitesh Choudhary

Күн бұрын

Пікірлер: 21
@FFGAMING-dr4dh
@FFGAMING-dr4dh 2 ай бұрын
You did great job Thanks a lot bro. U made go so simple
@zohaibmomin1731
@zohaibmomin1731 2 жыл бұрын
why was there no log message Listening at port ..... How will you know server is started
@mohammadminhaziftekhar4074
@mohammadminhaziftekhar4074 2 жыл бұрын
Connection was forcibly closed by a peer. - this error occurs 😥😥
@ochiojie
@ochiojie 2 жыл бұрын
I faced the same thing brother, I closed everything and tried it all again and it worked
@blackattitude5373
@blackattitude5373 6 ай бұрын
please help me,idk how to import packages in different programs like,from models program we have to import thw whole model package into controller's program,and the controller package we have to import it in routers program and lastly routers we have to import in main.go
@shahanahmedkhan6101
@shahanahmedkhan6101 5 ай бұрын
I used docker container for mongodb, If you configure p10k on your terminal then you'll have intellisense while writing commands on cli
@andreaseneres9581
@andreaseneres9581 4 ай бұрын
Hi, I have multiple collections like (attendance, employees, departments), it it good practice to connect to these in the init func like this? because my helpers are in another file and when I access the mongo.client variable there its returning nil // DepartmentCol = client.Database(db).Collection("Departments") // AttendanceCol = client.Database(db).Collection("Attendance") or what could be a workaround here? thank you very much
@ukwuteyinoreneojo4159
@ukwuteyinoreneojo4159 Жыл бұрын
Once i great a folder in my golang project folder it can not access the gorilla mux
@EmeraldLS
@EmeraldLS 2 жыл бұрын
I'm getting an error which says invalid user info
@aumradia5397
@aumradia5397 10 ай бұрын
while entering password in the connectionstring remove "" and then try to build.
@abhaysingh.632
@abhaysingh.632 Жыл бұрын
I tried and created a simple program to handle .env.json files which sets the environment variables when LoadEnv() is called! (as an Ex-*a*aScript dev it has became essential for me) (it does not works as intended because somehow controllers init() function runs before main.go's init() function) I think this is due to how packages are imported. So a simple solution for this is what I've done is create a new empty file which in returns sends a function of "API is Live" and has a init() function in it which loads before all the files I've imported hence problem solved!!!
@rakeshkumarnahak5320
@rakeshkumarnahak5320 Жыл бұрын
Ohh ki video ta wa mastre! (Comment in odia)
@kartikrajput2131
@kartikrajput2131 Жыл бұрын
has anyone solved the same _id problem?
@codingchannel6263
@codingchannel6263 2 ай бұрын
Header is set incorrectly, it should be this -----> w.Header().Set("Content-Type", "application/json") w.Header().Set("Allow-Control-Allow-Methods", "POST")
@nayyershahzad8051
@nayyershahzad8051 2 жыл бұрын
Excellent
@codingchannel6263
@codingchannel6263 2 ай бұрын
"Allow-Control-Allow-Methods" ----> It should be -----> "Access-Control-Allow-Methods"
@mrrishiraj88
@mrrishiraj88 3 жыл бұрын
Good Day
@sinxayush
@sinxayush 5 ай бұрын
hehe, i got 0 error on build :)
@docworldexplore
@docworldexplore 3 жыл бұрын
First person like n comment
Concurrency and goroutines in golang
13:18
Hitesh Choudhary
Рет қаралды 44 М.
Channels and Deadlock in golang
18:39
Hitesh Choudhary
Рет қаралды 27 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Handling routes and testing routes in golang
20:25
Hitesh Choudhary
Рет қаралды 18 М.
Race Condition in golang
18:46
Hitesh Choudhary
Рет қаралды 22 М.
Wait groups in golang
11:54
Hitesh Choudhary
Рет қаралды 27 М.
Building API in golang - Models
12:08
Hitesh Choudhary
Рет қаралды 32 М.
How to consume JSON data in golang
13:42
Hitesh Choudhary
Рет қаралды 31 М.
Defer in golang
10:27
Hitesh Choudhary
Рет қаралды 34 М.
How to make GET request in golang
11:46
Hitesh Choudhary
Рет қаралды 39 М.
Sending a API json response for all courses in golang
7:35
Hitesh Choudhary
Рет қаралды 22 М.
Functions in golang
13:36
Hitesh Choudhary
Рет қаралды 34 М.
Handling API calls in frontend in NextJS
39:35
Hitesh Choudhary
Рет қаралды 16 М.