Skip to main content

All Questions

Tagged with
0 votes
0 answers
16 views

Golang sending binary file over TCP via HTTP/REST

I'm writing a manager for cloud support of legacy IOT devices in Go, the devices establish a tcp connection with the manager, then that connection gets held open for bi-directional communication. The ...
Wayne's user avatar
  • 1
-2 votes
2 answers
28 views

"undefined: utils.GetTrimmedParam" Error when running the 'Hello World' code from 'Getting Started'

I ran the 'Hello World' code mentioned in the official GoFiber document document but got the following error: $ go run main.go # github.com/gofiber/fiber /home/user/go/pkg/mod/github.com/gofiber/fiber@...
user21819272's user avatar
1 vote
1 answer
36 views

Go REST API HTML Template File: Undefined API POST Route

When I search for quotes in my database in an admin page through my Go REST API, quotes show up fine with editing fields for their text, author, and category populating. However, the issue is that ...
Daggerpov's user avatar
  • 162
0 votes
0 answers
54 views

I set a cookie on the server in the login handler, but the cookie is not set

It's my cors headers: r := chi.New Router() r.Use(cors.Handler(cors.Options{ AllowedOrigins: []string{"https://SECRET.COM", "http://SECRET.COM"}, AllowedMethods: []...
Imran's user avatar
  • 9
2 votes
1 answer
88 views

Go file server doesn't serve folder

I am building a website with Golang, HTML, JS and CSS. Here is my folder structure: /data (Go files that contain data initialization) /handler (Go files for HTTP handling) /model (Go files ...
Seyit Ahmet Gökçe's user avatar
1 vote
0 answers
67 views

Use a custom logger, with go echo framework

i am trying to apply a format to my loggin, with request specific details in the format. EX: when i log "Test log" I should expected to be logged like: 2024-06-22T19:36:48+01:00 INFO [...
João Calhau's user avatar
0 votes
1 answer
68 views

API handler unable to access middleware's context value in Golang

I am trying to append value of my ID to context in my auth middleware, which verifies user and pass it to my API handler. I want to verify JWT in middleware and pass the id to handler for further use. ...
user25606885's user avatar
1 vote
1 answer
114 views

Use access token from Azure AD app to use with sharepoint REST API

I have an Azure AD app registered and my web app requires using both graph-api and REST API to fetch sharepoint account information. For eg: https://domain.sharepoint.com/_api/Web/RoleAssignments ...
Wajih Siddiqui's user avatar
1 vote
1 answer
47 views

How are we passing context while creating endpoint in go-kit

func MakeGetEndpoint(srv Service) endpoint.Endpoint { return func(ctx context.Context, request interface{}) (interface{}, error) { _ = request.(getRequest) // we really just need the ...
Lawliet's user avatar
  • 37
1 vote
0 answers
46 views

Is there a good way to publicize JSON schema defined in Go structs through an API?

Background I am writing a REST API, in Go, that focuses on queueing background jobs in a generic format. This is done by posting "Job Requests" that look like the following: { "...
DJL's user avatar
  • 166
1 vote
1 answer
102 views

How to mock a no response from server with Gin Golang

I'm mocking a server for testing my application. I built the mocked server with Golang and Gin. It works well for successful cases. But one of the cases I want to test is how the application behaves ...
Julio Martínez's user avatar
1 vote
1 answer
28 views

Using Goroutines to Annotate and Fetch Data in Background – Semaphore Acquisition Error within Route Handler

I am implementing a file annotation process in a Go web application. The process involves reading a file, storing IDs in an array, chunking the IDs, and then fetching data from a database using the IN ...
mad's user avatar
  • 31
1 vote
0 answers
60 views

What is misconfigured in my https request in Goland

I have a Go command that queries a service via Rest. Up until now I used http and had no issues, but once I moved to https I'm getting a weird error that I'm not sure how to handle. This is my ...
jenny's user avatar
  • 63
-1 votes
1 answer
44 views

unable to recreate CURL equivalent request in go-lang [duplicate]

I'm using a request bin (running on localhost:8080/anything) to capture what my application sends (kennethreitz/httpbin) so now i have two similar POST requests using two different user agents, which ...
Yadu's user avatar
  • 3,225
3 votes
0 answers
72 views

*github.Issue.Repository returns NULL

I am using GitHub rest api's and got familiar with the infra quite a bit. I am searching for the issues like this: iIssueResults, _, ierr := client.Search.Issues(*ctx, searchQuery, searchOptions) for ...
Hemant Bhargava's user avatar

15 30 50 per page
1
2 3 4 5
33