scan

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package scan finds context and code files modified after a reference time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindContextChanges

func FindContextChanges(refTime time.Time) ([]entity.ContextChange, error)

FindContextChanges returns context files modified after refTime.

Parameters:

  • refTime: Only include files modified after this time

Returns:

  • []entity.ContextChange: Modified files sorted by modtime descending
  • error: Non-nil if the context directory cannot be read

func GitLogSince

func GitLogSince(t time.Time, extraArgs ...string) ([]byte, error)

GitLogSince runs git log with a --since filter derived from t.

The time value is formatted as RFC 3339 internally so no caller-controlled string reaches exec.Command, satisfying gosec G204.

Parameters:

  • t: Reference time for --since
  • extraArgs: Additional literal git log flags

Returns:

  • []byte: Raw git output
  • error: Non-nil if git fails

func SummarizeCodeChanges

func SummarizeCodeChanges(refTime time.Time) (entity.CodeSummary, error)

SummarizeCodeChanges returns a summary of git activity since refTime.

All git failures return an empty summary (works in non-git dirs).

Parameters:

  • refTime: Only consider commits after this time

Returns:

  • entity.CodeSummary: Commit count, latest message, dirs, authors
  • error: Always nil (git failures yield empty summary)

func UniqueLines

func UniqueLines(output string) []string

UniqueLines returns unique non-empty lines from output.

Parameters:

  • output: Newline-separated text

Returns:

  • []string: Sorted unique non-empty lines

func UniqueTopDirs

func UniqueTopDirs(output string) []string

UniqueTopDirs extracts unique top-level directories from file paths.

Parameters:

  • output: Newline-separated file paths

Returns:

  • []string: Sorted unique top-level directory names

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL