Remove GoString methods from state
These method set the GoString format behavior, but they only output the default GoString format. Remove them to prevent copying mutex values.
This commit is contained in:
parent
056fd70da4
commit
7a579c271d
|
@ -579,10 +579,6 @@ func (s *State) sort() {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *State) GoString() string {
|
||||
return fmt.Sprintf("*%#v", *s)
|
||||
}
|
||||
|
||||
func (s *State) String() string {
|
||||
if s == nil {
|
||||
return "<nil>"
|
||||
|
@ -672,10 +668,6 @@ func (r *RemoteState) Equals(other *RemoteState) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func (r *RemoteState) GoString() string {
|
||||
return fmt.Sprintf("*%#v", *r)
|
||||
}
|
||||
|
||||
// OutputState is used to track the state relevant to a single output.
|
||||
type OutputState struct {
|
||||
// Sensitive describes whether the output is considered sensitive,
|
||||
|
@ -941,10 +933,6 @@ func (m *ModuleState) sort() {
|
|||
}
|
||||
}
|
||||
|
||||
func (m *ModuleState) GoString() string {
|
||||
return fmt.Sprintf("*%#v", *m)
|
||||
}
|
||||
|
||||
func (m *ModuleState) String() string {
|
||||
var buf bytes.Buffer
|
||||
|
||||
|
@ -1294,10 +1282,6 @@ func (r *ResourceState) sort() {
|
|||
sort.Strings(r.Dependencies)
|
||||
}
|
||||
|
||||
func (s *ResourceState) GoString() string {
|
||||
return fmt.Sprintf("*%#v", *s)
|
||||
}
|
||||
|
||||
func (s *ResourceState) String() string {
|
||||
var buf bytes.Buffer
|
||||
buf.WriteString(fmt.Sprintf("Type = %s", s.Type))
|
||||
|
@ -1447,10 +1431,6 @@ func (s *InstanceState) MergeDiff(d *InstanceDiff) *InstanceState {
|
|||
return result
|
||||
}
|
||||
|
||||
func (i *InstanceState) GoString() string {
|
||||
return fmt.Sprintf("*%#v", *i)
|
||||
}
|
||||
|
||||
func (i *InstanceState) String() string {
|
||||
var buf bytes.Buffer
|
||||
|
||||
|
|
Loading…
Reference in New Issue