Tag Archives: Golang learning route

Json: struct field readyReplicas has json tag but is not exported [How to Solve]

type MeshStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	AvailableReplicas int `json:"available_replicas,omitempty"`
	readyReplicas     int `json:"ready_replicas,omitempty"`
	Replicas          int `json:"replicas,omitempty"`
}

error: struct field readyReplicas has json tag but is not exported
Cause of the error readyReplicas does not have a capitalization at the beginning ReadyReplicas