Remove dead code: splitLines loop, unused methods (gt-2g130)
- polecat.go: Remove unreachable first loop in splitLines (was using filepath.SplitList incorrectly) - townlog/logger.go: Remove unused Event.JSON() method and json import - lock/lock.go: Remove unused ErrStaleLock error variable - refinery/manager.go: Remove unused getTestCommand() method Note: witness.StatePaused is actually used by cmd/witness.go, not dead code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
package townlog
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -272,12 +271,6 @@ func splitLines(s string) []string {
|
||||
return lines
|
||||
}
|
||||
|
||||
// LogEventJSON writes an event in JSON format for machine parsing.
|
||||
// Returns the JSON representation.
|
||||
func (e Event) JSON() ([]byte, error) {
|
||||
return json.Marshal(e)
|
||||
}
|
||||
|
||||
// TailEvents returns the last n events from the log.
|
||||
func TailEvents(townRoot string, n int) ([]Event, error) {
|
||||
events, err := ReadEvents(townRoot)
|
||||
|
||||
Reference in New Issue
Block a user