Skip to content

Instantly share code, notes, and snippets.

View Henkoglobin's full-sized avatar
🛒
Working in E-Commerce

Henrik Ilgen Henkoglobin

🛒
Working in E-Commerce
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