@0x00 - eviltoast
  • 0 Posts
  • 1 Comment
Joined 5 months ago
cake
Cake day: June 12th, 2024

help-circle
  • My least favorite part of Go, by far, is the capitalization as struct member visibility thing. That and the not super great json encoding annotations.

    Here’s a sample:

    type Change struct {
    	Path             string `json:"path"`
    	Category         string `json:"category"` // change, append, create, delete
    	Position         int64  `json:"position"`
    	Size             int64  `json:"size"`
    	OriginalChecksum string `json:"original_checksum"`
    	UpdatedChecksum  string `json:"updated_checksum"`
    	UnixTimestamp    int64  `json:"unix_timestamp"`
    	Data             []byte `json:"data"`
    	MatchedRules     []Rule `json:"matched_rules"`
    }
    

    I would take explicit public declarators any day