In Go, let's say I have this struct:
type Job struct {
totalTime int
timeToCompletion int
}
and I initialize a struct object like:
j := Job {totalTime : 10, timeToCompletion : 10}
where the constraint is that timeToCompletion
is always equal to totalTime
when the struct is created (they can change later). Is there a way to achieve this in Go so that I don't have to initialize both fields?