17 questions
Best practices
0
votes
2
replies
84
views
What is the best practices to delete outdated data from the SQLite database on the server?
I have a Golang server (pet project) and each second I add 2879 bytes of data in database. At the moment I'm about a 1GB of data. I want to cleanup the database to avoid a moment when I'm run out of ...
0
votes
0
answers
227
views
Why my golang net/http server is stopped after any time?
I have an LXC with AlmaLinux8.7 and go1.19.5 linux/amd64.
Also, I compile the program with the go build main.go command from this code:
package main
import (
"net/http"
"log"...
1
vote
1
answer
249
views
Why is my GO server not displaying my HTML files in the browser?
I am doing a GO course, and whenever I run my server code, I don't get any errors but when I try to type in "localhost:8080" in the browser, I get a message saying "localhost didn’t ...
1
vote
1
answer
63
views
Storing field of struct accessed via reflection
I am picking up quest parameters for my game from a CSV. The parameters include a stat tracked, e.g. "CardsDeployed", and conditions for what kind of cards are valid for this quest. The ...
1
vote
0
answers
218
views
How do I add a Subrouter to muxtrace.Router()?
I currently have a function in Go that creates a subrouter if a mountpoint is passed when creating a new server. I want to set up tracing using muxtrace.
import {
muxtrace "gopkg.in/DataDog/dd-...
-3
votes
1
answer
1k
views
html renderer in Golang without third party imports [closed]
I am self-teaching myself go and I have started experimenting with using go as a back end.
I have the following code which renders HTML pages, but I am looking for a solution that doesn't rely on a ...
1
vote
1
answer
5k
views
Remove trailing slash from urls - Go static server
I've set up a simple Go static file server with http.FileServer. If I have a directory structure like public > about > index.html, the server will correctly resolve /about to about > index....
-6
votes
3
answers
520
views
How can I Authenticate any login for a http request done by client?
I have an HTTP server in Go in which when client is trying to login I have to authenticate credentials and in return i want to send success or failure. Later if any request come, I need to ...
0
votes
1
answer
385
views
Remote go-agent doesn't connect to go-server
Go-agent and go-server same version - v18.8.0. Server and agent are installed in different machines. In go-server/agents , the agent is not listed. The agent configuration file in /etc/default/go-...
9
votes
1
answer
4k
views
How to custom handle a file not being found when using go static file server?
So I'm using a go server to serve up a single page web application.
This works for serving all the assets on the root route. All the CSS and HTML are served up correctly.
fs := http.FileServer(...
2
votes
1
answer
520
views
Go server with 2 cpus
I'm building a GRPC server in GO and I want increase its performance. I've increased my machine and put 2CPUS in order to make it better but I noticed that my server doesn't use all cpu cores and I ...
32
votes
4
answers
101k
views
Golang dynamically creating member of struct
I know there is struct in Go, but for all I know, you have to define struct
type Circle struct{
x,y,r float64
}
I am wondering how you can declare a new variable that doesn't exist in the struct
...
0
votes
1
answer
793
views
Load Angular2 Bootstrap template ng2-admin on Go server : download fail
I am new to this forum and a newbie in Angular2 and Golang.
My issue is that I would like to try out a template on a Go server.
So, I created a main.go file containing this main() function :
func ...
3
votes
0
answers
688
views
GoCD - Notification for GoAgent status changes(missing/lost contact)
I am using GoCD for the automated deployment of our application. I am facing an serious issue, that is if any agent lost contact/missing - its corresponding pipeline just hangs.
There is no ...
1
vote
0
answers
93
views
GoCD issue when I run a C# application
I am running a C# tool to test the Performance of deployed package and the tool tries to start Performance counters in the machine where the package is deployed. I am getting Exception while adding ...
3
votes
1
answer
589
views
Is there any possible way to delete stage history in GoAgent?
I am using GoCD for package deployment and I would like to know if there are any possible ways to delete the Stage History in GoAgent.
I am asking this because the stage label was increasing to some ...
1
vote
2
answers
22k
views
How to run a Go project on Go server?
I have no experience on GoLang.
I have a Go project and I want to run it on my local server on my ubuntu 14.04. I have installed Go server and Go agent and they are running.
hesam: ~ $ sudo /etc/init....