Click here to Skip to main content
15,892,809 members
Everything / Programming Languages / Go

Go

Go

Great Reads

by Scott Tattersall
Building a custom-designed PCB for an Internet of Things (IoT), “connected” device from scratch
by Kel_
Building a financial stock explorer app using open-source emitter publish/subscribe, Go and Javascript.
by Lars Paisley
A simple approach to documenting ESB transactions and transformations
by Farhad Reza
This tip describes how we can create a simple window in Go programming language using Win32 API functions.

Latest Articles

by José Cintra
IoT architecture proposal for sensor data acquisition modules using the REDIS database and the GO language
by Bohdan Stupak
Clean architecture example implemented in Go
by Alexey Shtykov
Lot of fancy languages were born and have died since I started working in IT, but a few of them continue their pitiful existance.
by Bohdan Stupak
This article describes a super-minimalistic auth endpoint based on AWS Lambda.

All Articles

Sort by Title

Go 

9 Jan 2020 by ilostmyid2
Hi There's a source (camera) which sends notifications (motion alarms) to port 8085 of a server I've subscribed its IP for it. Maybe in such a negotiation I can't call it 'server', but it's our server which serves some other things. I've written two programs for receiving and echoing current...
3 Feb 2015 by Sergey Alexandrovich Kryukov
Sorry, this is off-topic. We do not provide the search of developers, we only ask technical/scientific questions. If you have one you are very welcome to ask.—SA
4 Aug 2017 by Govardhanudu Gajula
For google maps i created on API after 2 day this error is coming the google maps api server rejected your request. the provided api key is expired please give the solution for permanent API key Thanks in advance What I have tried: i create key in below link Google Maps Embed API  | ...
4 Aug 2017 by Richard MacCutchan
This is not the place to get an answer to such a question. This is obviously a problem for Google to fix, and that is the place to go for help.
4 Aug 2017 by RickZeeland
See the answer here: The Google Maps API server rejected your request. This IP, Site or mobile application is not authroised to use this API key - Stack Overflow[^]
3 Aug 2022 by Bohdan Stupak
This article describes a super-minimalistic auth endpoint based on AWS Lambda.
6 Dec 2017 by Scott Tattersall
Building a custom-designed PCB for an Internet of Things (IoT), “connected” device from scratch
27 Nov 2021 by Mircea Neacsu
Effective management tool for multiple libraries
21 Nov 2019 by Jeremy Likness
A Content Security Policy (CSP) helps prevent a variety of attacks on your site. This article describes how to implement one for a static website when you don't control the headers.
21 Nov 2019 by Jeremy Likness
Generate a thumbnail for your Hugo posts on the fly, then create a custom short code that uses thumbnails and page data like title and description to embed a post preview to interlink documents.
1 Dec 2015 by Farhad Reza
This tip describes how we can create a simple window in Go programming language using Win32 API functions.
12 Feb 2018 by Lars Paisley
A simple approach to documenting ESB transactions and transformations
1 Aug 2018 by Lars Paisley
A discussion of routing principles in ESBs
29 Dec 2019 by Ri Xu
Golang library for reading and writing Microsoft Excel™ (XLSX) files.
28 Nov 2018 by Afzaal Ahmad Zeeshan
Go language and discuss of it as a C-family developer
19 Apr 2017 by Intel
With Intel DAAL, cgo, and SWIG we were able to integrate optimized Cholesky decomposition right in our Go programs.
22 Feb 2017 by SirWernich
i'm currently learning go and i'm at interfaces point in the course now. the sort package seems to be a good thing to learn about, not just because you can sort stuff, but also because the "Interface" interface is needed to do some of the work.(tl;dr: read the next paragraph, check the...
16 Mar 2023 by Member 15953349
This abstract code will display "true" in a loop as long as channel receives new messages. package main import ( "fmt" "sync" ) var a = make(chan bool) var wg sync.WaitGroup func main() { wg.Add(1) go test() for i := 0; i
21 Apr 2019 by setevoy4
What pointers are? Pointers examples in Golang. * and & operators. Pointer as an argument to a function. Functions - arguments by value and by reference.
21 May 2019 by storyicon
gos is compatible with all go commands and has go mod/get equipped with smart GOPROXY, it automatically distinguishes between private and public repositories and uses GOPROXY to download your lost package when appropriate.
4 Jul 2019 by storyicon
grbac is a fast, elegant and concise RBAC (role-based access control) framework
1 Feb 2021 by jfriedman
When you need a janky [unsafe] way to generate communitive hash codes
20 Jan 2024 by OriginalGriff
Talk to Google: it's their software, their ads - and they don't get paid until people can see the ads on your site. If nothing else, they can point you at the official doc8umentation which will explain how to use them.
20 Jan 2024 by angry whopper
you guys have any issue with building dashboard for company using google ads API? i have somehow cannot connect the dots between those the dashboard and the API What I have tried: actually i only adding the API
4 May 2022 by nocnoc
I ran my code through SonarQube and it suggested me to reduce my code's cognitive complexity. I make use of quite a few nested loops, but I have tried to reduce it to the best of my abilities and would appreciate some suggestions. According to...
25 May 2021 by vishsword
package main func NbMonths(startPriceOld, startPriceNew, savingperMonth int, percentLossByMonth float64) [2]int { spo := startPriceOld spn := startPriceNew sm := savingperMonth pl := percentLossByMonth x := 100 c := 0.0 diff := spn - sv...
25 May 2021 by k5054
There's a number of issues here: Firstly you have if ( c % 2 !==0 ), which probably wants to be if ( c %2 != 0 ). But even correcting that and pushing your code through the Go Playground The Go Playground[^] we get a number of errors: ...
25 May 2021 by OriginalGriff
Go has two basic assignment operators "=" and ":=". The first is a straight assignment, which requires that the variable on the left hand side already exists. The second declares the variable, and gives it a value. If you use the first form...
6 Oct 2021 by OriginalGriff
This is the same question you asked two hours ago: How do I copy a file without overwriting an existing file in golang?[^] The answer does not change in that time, no matter how much you want it to.
6 Oct 2021 by sreeja reddy
I have the below code that copies a text file from a directory to another with overwriting the file if exists What I'm looking for is to copy the file to the destination directory without overwriting, but keep both files. As in Windows for...
6 Oct 2021 by OriginalGriff
Windows itself does this checking for you when you copy'n'paste or drag'n'drop files then if it finds a duplicate if uses a new file name, but your code is expected to know what it is doing, and no such checks are made. If you want to do that,...
3 Feb 2015 by Cesar Bretana Gonzalez
Hi everyone, due to my previous question to see if there is some golang developer on this network, here is a new one, How can I link gtk with go?, i did download the go-gtk library from github, and followed the readme.md, but didn't work to me, if anyone did this before, please, i need some...
8 Apr 2019 by Member 14050287
type Websocket struct { upgrader *websocket.Upgrader CmdProxy proxy.CmdProxy connections map[uint64]map[*websocket.Conn]bool init sync.Once lock sync.Mutex } func (w *Websocket) Upgrade(thingId uint64, wr http.ResponseWriter, r *http.Request) error { w.init.Do(func() { w.connections...
2 May 2019 by reBertran
Currently translating weighted DAG to C code which is written in Go language and topologically sorted. Actually I missed a couple part of the code that is the code below sample. In topoSort function, I couldn't get what "visit" declaration is. Is it function declaration within another function ?...
2 May 2019 by Christian Graus
There's no array slice in C. You'd have to create a new array. Visit - The Go Programming Language[^][^] The source code for the visit function is here, so I assume you can work out what it does from here
7 Dec 2022 by p-shubh
i will be revieving a jwt token from the supabase which is an alternative of firebase and i have to verify it and store its information in a datbase and more over i am unable to connect the supabase to my back-end as i am using golang language...
7 Dec 2022 by Graeme_Grant
I'm not familiar with GO as a language, so I did a quick Google Search: read jwt go - Google Search[^] and can see a number of solutions. Pick one that suits your needs.
27 Aug 2017 by Member 13380432
Hi, I'm new to coding and want to ask how do you choose a programming language for a project? What are the choosing based on? Most answer I found says it's based on what I need. But I don't know what I need. I just know what I want to build. Let say I want to build an E-commerce website and...
27 Aug 2017 by Richard MacCutchan
For such a website you need ASP.NET which means you need to learn the following to start with: HTML Css Javascript C# or VB.NET You can find samples and tutorials here on CodeProject at Web Development[^] and at the official ASP.NET | The ASP.NET Site[^].
27 Aug 2017 by Patrice T
Quote: Let say I want to build an E-commerce website and mobile web Get started here for web site W3Schools Online Web Tutorials[^]
27 Aug 2017 by RickZeeland
This might be of interest to you too: [Top 10 Programming Languages in 2017] It is a bit superficial, but gives a good overview. Also interesting: Stack Overflow Developer Survey 2017[^] 'Most popular' does not mean that these are the best languages for you, although the GO language is listed...
17 Nov 2022 by Member 15806825
PS C:\Users\dddd\go\src\Hdddd> go run main.go *******browse Handler running******* 2022/11/14 14:01:44 http: panic serving 127.0.0.1:65343: runtime error: invalid memory address or nil pointer dereference goroutine 26 [running]:...
6 Jun 2021 by ibilalkayy
func Uploadfile(filename, filepath string) { data, err := ioutil.ReadFile(filename) if err != nil { log.Fatal(err) os.Exit(0) } bucket, err := gridfs.NewBucket( CNX.Database("VWS"), ) if err != nil...
6 Jun 2021 by Richard MacCutchan
Quote: Although the path is correct. The error message is clearly telling you that the path is not correct. I suspect there should be a forward slash at the beginning: "/home/bilal/Videos".
30 Dec 2019 by Ri Xu
This post shows you how to import and export Excel XLSX in Go language.
1 Feb 2023 by Member 14760154
I am a new developer , i have a problem about load json result in javascript i have a javascript function to fetch data from API and it was successfull the result is like this { "metadata": { "code": 200, "message":...
1 Feb 2023 by OriginalGriff
Look at the JSON data: response isn't an array, Data is. Have a look here: Working with JSON - Learn web development | MDN[^]
30 Jul 2021 by ibilalkayy
base.html {{define "base"}} {{template "title" .}} Home {{if .Loggedin}} ...
11 Dec 2021 by ibilalkayy
controllers.go type List struct { ProductsList []string Description string Link []string Success bool Failure bool } func Home(w http.ResponseWriter, r *http.Request) error { if r.URL.Path != "/" { fmt.Fprintln(w,...
3 Apr 2017 by WishfulCoder
I've got a Golang Website where I want to display 'scores' from my UWP Game using SQLite's Mobile App Quickstart's API called SwaggerUI. I am getting the scores by doing a HTTP GET request. The problem is that the scores output to the Golang console in JSON Format. I want to display the scores...
20 Nov 2021 by ibilalkayy
func Home(w http.ResponseWriter, r *http.Request) { if r.URL.Path != "/" { fmt.Fprintln(w, "404 page not found") return } for i := 0; i
23 Oct 2022 by Member 15806825
write a golang code for the problem: Suppliers 'A' and 'B' provided the following numbers of products for the luxury hamper market: >Product 'A' 'B' Price Per Unit BelugaCaviar 5248 640 128 ChristmasCake 1312 1888 135 GammonJoint 2624...
22 Oct 2022 by OriginalGriff
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for...
22 Feb 2023 by Member 15806825
{ "data": null, "errors": [ { "path": [ "createoff" ], "data": null, "errorType": "Lambda:Unhandled", "errorInfo": null, "locations": [ { "line": 2, "column": 3, ...
15 Dec 2021 by ibilalkayy
type List struct { Success bool } func Home(w http.ResponseWriter, r *http.Request) error { if r.URL.Path != "/" { return PageError(w, r) } var user List user = List{ Success: true, } if r.Method == "GET" { return...
21 Jan 2022 by ibilalkayy
db.go func Findaccount(myEmail, myPassword string) bool { collection := Connect.Database("webApp3").Collection("data") collection.FindOne(context.TODO(), bson.M{"email": myEmail}).Decode(&Account) err :=...
21 Jan 2022 by joshun
return (err == nil) How about this?
22 Nov 2015 by Marc Clifton
Each function should answer "how-what-why."
30 May 2022 by Bohdan Stupak
This article shows how utilizing lazy evaluation and caching can save us from wasteful computation
6 May 2021 by Azeez Khan
package data import "fmt" type Product struct{ ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` Price float32 `json:"price"` SKU string `json:"sku"` ...