Skip to content

Instantly share code, notes, and snippets.

View th0mas's full-sized avatar
🤿
Diving into Rust

Tom Haines th0mas

🤿
Diving into Rust
View GitHub Profile
@lummie
lummie / enum.go
Last active June 16, 2024 16:19
Golang Enum pattern that can be serialized to json
package enum_example
import (
"bytes"
"encoding/json"
)
// TaskState represents the state of task, moving through Created, Running then Finished or Errorred
type TaskState int