
DailyGolangQuiz
@dailygolangquiz
Daily Go quiz, by @fmtprintf.
You might like
Happy New Year! Let it bring interesting problems to solve, new technologies to play with and new friends. Happy coding and talking!
Hi followers! I do apologise - during the Christmas time it is complicated to find time to update quiz daily. Expect irregular updates.
In #golang, how to check that date is valid? For example, 21/02/2015 is correct, but 31/02/2015 does not.
Which package should be used when dealing with #go code structure? For example, you can list all the file functions with it.
#golang Today's challenge is from @davecheney: dave.cheney.net/2015/11/18/wed… - Can you see a data race?
Which #golang command formats Go source files? Does it simplify development in your team? Why?
#go #golang What is redundant in the code below? tpl, err := templates.Parse(text) if err != nil { log.Fatal(err) return }
#go #golang allows to call either `v:=..` or `v,ok:=..` while reading from map. Similar check can be used with ... (name at least two more)
#go #golang What should be instead of ***? var s *** s.Add(2) go func(){... s.Done()} go func(){... s.Done()} s.Wait()
#go Which #golang data structure supports removing minimum-valued element and adding elements in O(log(n))?

@nodirtz Yes, it works on linux/mac, but on windows it fails with "The process cannot access the file...".
#go #golang why it is incorrect and does it work for you? f,_:=os.Create("hi") defer f.Close() … f.write([]byte{"world"}) … os.Remove("hi")
#go #golang Try to delete file with os.Remove on windows and mac/linux. Now make it readonly and try again. What is the difference?
#go #golang What should be used to do cross-platform path operations? How to get file name in the cross-platform way?
#go #golang what will happen if OS is Windows? If Mac/Linux? How to make it right? ioutil.WriteFile("HI\\THERE.TXT", []byte("WOW"), 0644)
#go #golang Why it is bad and what is correct pattern? ioutil.WriteFile("Hi.txt", []byte("Bill"), 0644) … d, _ := ioutil.ReadFile("hi.txt")
United States Trends
- 1. Happy Birthday Charlie 18.2K posts
- 2. Good Tuesday 20.8K posts
- 3. #Worlds2025 21.6K posts
- 4. Bears 91.5K posts
- 5. Caleb 50.8K posts
- 6. Snell 25.4K posts
- 7. Jake Moody 14.3K posts
- 8. Jayden 23.4K posts
- 9. Joji 34.6K posts
- 10. Commanders 53.3K posts
- 11. Swift 292K posts
- 12. #BearDown 2,458 posts
- 13. Ben Johnson 4,589 posts
- 14. Pentagon 66.5K posts
- 15. Conquered 29.3K posts
- 16. Turang 4,467 posts
- 17. Roki 6,208 posts
- 18. Blinken 25.6K posts
- 19. Benin 84K posts
- 20. Bijan 34.2K posts
You might like
-
Alexandre Ruban
@alexandre_ruban -
GopherConIndia
@GopherConIndia -
YouTrack by JetBrains
@youtrack -
James Bridger
@jcjbridger -
Peter Kieltyka
@peterk -
Stella Miranda
@fashionate -
GopherCon UK
@gopherconuk -
Gani Mendoza
@ibm2100 -
Dominik Honnef
@dominikhonnef -
Tommy Leung
@supertommyleung -
Adam Pohorecki 🇺🇦💙💛
@apohorecki
Something went wrong.
Something went wrong.