The Go Playground is a web service that runs on golang.org's servers. The service receives a Go program, compiles, links, and runs the program inside a sandbox, then returns the output.
23 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Unanswered (my tags)
Go playground url validate
I am sending a request which has a URL and Content in the body. The validations are such that either URL or epicentre is mandatory. The program is erroring when the URL is empty as url validate on an ... go go-playground
Daffodil
- 29
Backspace character does not work in the Go playground
I am new to Go. Just learnt the various uses of fmt.Println(). I tried the following stuff in the official playground but got a pretty unexpected output. Please explain where I have gone wrong in my ... go control-characters go-playground
justanotherguy
- 313
cmd.StdoutPipe example in go pkg docs does not run in playground
cmd.StdoutPipe example at go documentation: does not run in playground. Error: fatal error: all goroutines are ... go concurrency go-playground
Abhay Pratap Singh
- 101
How to perform the parameter type check in golang gin using validator?
I have a Validator struct like this type UploadFileFormValidator struct { File []*multipart.FileHeader `form:"File" binding:"required,min=1"` InputKey string ... go go-gin go-playground
JY F
- 29
Will the code be deleted when I close vscode-go:playground?
I accidentally clicked on "go run on go playground" when I was developing in vscode. Since it is a company code, I would like to know if the code will be deleted. go visual-studio-code vscode-extensions go-playground
5waker
- 23
Closing stop channel does not stop goroutines
INTRODUCTION: I am just starting to learn the Go language and have reached the lesson about concurrency. I have invented a small task for myself to try to implement what I have learned about closing ... go go-playground
AlwaysLearningNewStuff
- 2,871
How can I validate a struct datatype with a custom validator?
I am using go-playground/validator/v10 to validate some input and have some trouble with custom validation tags and functions. The problem is that the function is not called when one of the struct ... go go-playground
FewWords
- 505
net/http doesn't work in the Go Playground
Can someone please explain what am I doing wrong. So basically I'am trying to make a simple HTTP GET request. I copied code from When I'm running it locally ... go go-playground
Vor
- 30.6k
validating array of structs using goplayground validator library
How can I validate a slice of structs using validator framework? For example, in the following type definitions, I want to validate each element in the field Puppies. type User struct { FirstName ... validation go go-playground
Rajesh
- 11
playground - timeout running go build
When I try to run code snippet on playground (snippet) , I get an error: timeout running go build go: finding module for package go: downloading v1.7.1 go:... go go-playground
kozmo
- 3,107
go2go.playground - expected type, found 'type' (and 1 more errors)
I try to run examples from the design draft (The Next Step for Generics) on go2go.playground type Pair(type T) struct { f1, f2 T } , but get an error prog.go2:14:11: expected type, found 'type' (and ... go generics go-playground
kozmo
- 3,107
Exiting forever loop using channels - issues with Go Playground
I am trying to implement a simple logic where a Producer sends data to a channel ch with an forever for loop and a Consumer reads from the channel ch. The Producer stops producing and exit the forever ... go go-playground
Picci
- 15k
How to chain validations together using Golang go-playground/validator?
I am using for a REST API server. I am using the same struct for different endpoint with different validation requirement. For example, /users/login requires ... validation go go-playground
huggie
- 16.5k
Package name containing hyphen
I am having some trouble understanding that why my code complains when I have hyphen in package. e.g. if I have a package name foo-bar and I declare that package name package foo-bar foo-bar/config.... go go-playground
Aman Chourasiya
- 788
Why does Go test with blocked channel not reporting deadlock
I met a strange issue when doing test with channels. In a normal main function, the following code will report the deadlock error. package main import ( "fmt" ) func main() { c := make(... go testing channel go-testing go-playground
James Ni
- 125
153050per page