gofpher
service
gofpher | service | |
---|---|---|
2 | 18 | |
9 | 3,625 | |
- | 0.7% | |
0.0 | 9.5 | |
over 7 years ago | 3 days ago | |
Go | Go | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
gofpher
-
Functional Programming Library for Golang by IBM
I'm glad to see this idea getting some traction again. I haven't used Go much in the last few years, but I started writing playing around with a similar idea back in 2016 when I was working on a small compiler for a configuration management tool, and later put together a [small stand-alone proof of concept library](https://github.com/rebeccaskinner/gofpher) as part of a [talk](https://speakerdeck.com/rebeccaskinner/monadic-error-handlin...).
At the time, I remember finding FP in go surprisingly ergonomic. Implementing the library to support it was a pain since the type system wasn't expressive enough to prevent everything from devolving into a pile of untyped reflection, but it was reasonably easy to keep that an implementation detail. On the whole, I felt like go would have lent itself well to the "dash of FP for flavor" style of programming that seems to be gaining popularity these days. Unfortunately, in 2017 at least, the Go community seemed to have very little interest in the idea.
I still have a fondness for Go. It always felt nice to use. If the language features have caught up to the point where a robust library like this is feasible, and the communities attitude has shifted, I might take another look at the language.
-
Learn Go in ~5mins
Monadic error handling like in ML work-alikes, Rust etc. would be a good start. Adopt:
• https://github.com/rebeccaskinner/gofpher
• https://speakerdeck.com/rebeccaskinner/monadic-error-handlin...
I've been talking to the local Go user group. No one even knows about that concept. This continues a pattern of general ignorance/lack of looking beyond one's horizon I've noticed.
service
-
Should I take the Ardan Labs course? If yes, then which one?
Ultimate Service was useful for me. None of the "backend" concepts were new, but you get to see how Bill would layout/design an API-based service. If you're experienced you'll notice the opinionated choices he makes, and I found myself saying "Nah, I'm not sure I'd do it like that". I appreciated its use of Kubernetes and KIND as I'd never played with them before. How he uses Docker to spin up a DB instance for tests is pretty cool. There's a lot of copy & paste as you code along with him (you copy from the "finished project" and paste into your work in progress). The full example project is online at https://github.com/ardanlabs/service. You won't write all that code, and this version is newer than the one I did, but it gives you an idea of what you might learn.
-
If you could go back in time | What would you do different regarding go
So what can you do insted? For testing databases, setup a docker instance for tests (e.g. like in https://github.com/ardanlabs/service), or start an embedded-postgres daemon (see https://github.com/fergusstrange/embedded-postgres). For communication with external APIs, just pass the http.Client (either in context.Context or as a field on the struct). Then in tests, you can override the http.Client.Transport func.
- Where can I find well-written go code to learn from?
-
GO web sever - file structuring convention
Take a look at https://github.com/ardanlabs/service from Bill Kennedy. You can probably simplify the structure a bit since your project is minimal, but that repo is gold.
-
Say you're mentoring someone just getting comfortable with go. What do you think they should know?
Checkout https://github.com/ardanlabs/service for inporation. Tip: try to avoid creating a service package with all services, a domain package with all domain structs, etc.
-
Any resources on building a simple web app with Go without any frameworks?
Or go through this repo https://github.com/ardanlabs/service
-
GitHub - johnwarden/httperror: Golang package for returning errors instead of handling them directly.
I've seen this handler modification and wrapping pattern in Ardan Labs' service repository. https://github.com/ardanlabs/service/tree/master/foundation/web
-
REST API project structure
https://github.com/ardanlabs/service This is something which I really like and has taken into account a lot of engineering decisions.
- GitHub examples of Go that's written really well?
- Is "Let's go" and "Let's go further" worth it?
What are some alternatives?
FuncFrog - Stream api (kind of) implementation for go, other useful functions and packages to use go in a functional way
golang-standards/project-layout - Standard Go Project Layout
fp-go - functional programming library for golang
go-starter - An opinionated production-ready SQL-/Swagger-first RESTful JSON API written in Go, highly integrated with VSCode DevContainers by allaboutapps.
gotests - Automatically generate Go test boilerplate from your source code.
scaffold - Generate scaffold project layout for Go.
scala - Scala 2 compiler and standard library. Scala 2 bugs at https://github.com/scala/bug; Scala 3 at https://github.com/scala/scala3
pagoda - Rapid, easy full-stack web development starter kit in Go
lo - 💥 A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find...)
modern-go-application - Modern Go Application example
mo - 🦄 Monads and popular FP abstractions, powered by Go 1.18+ Generics (Option, Result, Either...)
cookiecutter-golang - A Go project template