In Go, let's say I have this structure:
type Job struct { totalTime int timeToCompletion int }
and I initialize the struct object as follows:
j := Job {totalTime : 10, timeToCompletion : 10}
where the limitation is that timeToCompletion always equal to totalTime when creating the structure (they can change later). Is there a way to achieve this in Go, so that I do not need to initialize both fields?
source share