indykite / neo4j-graph-tool-core

Usage of both value and pointer receivers GO-W1029
Anti-pattern
Major
4 months ago4 months old
Type "ExecutionSteps" has both value and pointer receivers
 93
 94// String converts all cyphers and command calls into single long string.
 95// Is not really suitable for Cypher shell, but can be used for debug print.
 96func (e ExecutionSteps) String() string { 97	s := strings.Builder{}
 98	for _, v := range e {
 99		switch {
Type "ExecutionSteps" has both value and pointer receivers
 81}
 82
 83// AddCommand adds command with parameters to step list.
 84func (e *ExecutionSteps) AddCommand(args []string) { 85	if len(args) == 0 {
 86		return
 87	}
Type "ExecutionSteps" has both value and pointer receivers
 56
 57// AddCypher adds all Cyphers into one buffer. If current step is Cypher as well, it is reused.
 58// Otherwise new buffer is created.
 59func (e *ExecutionSteps) AddCypher(cypher ...string) { 60	if len(cypher) == 0 {
 61		return
 62	}
Type "ExecutionSteps" has both value and pointer receivers
 50}
 51
 52// IsEmpty checks if there are steps to do.
 53func (e ExecutionSteps) IsEmpty() bool { 54	return len(e) == 0
 55}
 56