fix(config): standardize Provenance to pointer receivers (recvcheck)
Paths and String were value receivers alongside the mutating record() pointer method. All Provenance uses are through addressable struct fields, so this is behavior-preserving.
This commit is contained in:
1 parent
4351d77166
commit
806cd75e28
1 file changed
+2
-2
@@ -53,7 +53,7 @@ type Provenance struct {
|
||||
func (p *Provenance) record(o Origin) { p.Origins = append(p.Origins, o) }
|
||||
|
||||
// Paths returns the contributing file paths in precedence order.
|
||||
func (p Provenance) Paths() []string {
|
||||
func (p *Provenance) Paths() []string {
|
||||
paths := make([]string, 0, len(p.Origins))
|
||||
for _, o := range p.Origins {
|
||||
paths = append(paths, o.Path)
|
||||
@@ -62,7 +62,7 @@ func (p Provenance) Paths() []string {
|
||||
}
|
||||
|
||||
// String renders the full chain for diagnostics.
|
||||
func (p Provenance) String() string {
|
||||
func (p *Provenance) String() string {
|
||||
if len(p.Origins) == 0 {
|
||||
return "(no configuration files)"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user