digest

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Package digest는 기간 안의 위키 변화를 집계한다. 상태를 남기지 않으므로 같은 위키에 같은 기준 시각을 주면 몇 번을 돌려도 같은 결과가 나온다. ADR 0028.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Days      int      `json:"days"`
	Since     string   `json:"since"`
	Until     string   `json:"until"`
	StaleDays int      `json:"staleDays"`
	Created   []string `json:"created"`
	Stale     []string `json:"stale"`
	Orphans   []string `json:"orphans"`
}

Result는 digest 집계 결과다. 슬러그 목록은 항목별로 정렬되어 있다. 승급 집계는 없다. promote 가 승급 시각을 프론트매터에 남기지 않으므로 시각이 없는 집계는 지어낼 수밖에 없어 뺐다.

func Run

func Run(wikiRoot string, cfg config.Config, now time.Time, days int) (Result, error)

Run은 기간 안의 변화를 집계한다. 창은 [now - days일, now] 다. 노후 판정은 resurface.IsStale 이 단일 진실원이므로 두 커맨드가 같은 문서를 노후라고 한다. 고아 판정은 lint 의 graph.orphan 규칙에서 가져온다. 판정이 두 벌이 되면 커맨드끼리 다른 수를 말하게 된다.

Jump to

Keyboard shortcuts

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