Help us shape the future of Go! Take the 2026 Go Developer Survey

activityreport

package
v1.17.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package activityreport summarizes commit timestamps for day, week, and month views.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket struct {
	Label   string `json:"label"`
	Start   string `json:"start"`
	End     string `json:"end"`
	Commits int    `json:"commits"`
}

Bucket is one reporting period.

type Summary

type Summary struct {
	Daily   []Bucket `json:"daily"`
	Weekly  []Bucket `json:"weekly"`
	Monthly []Bucket `json:"monthly"`
}

Summary is the machine-readable activity report.

func SummarizeUnix

func SummarizeUnix(times []int64, now time.Time) Summary

SummarizeUnix counts commit timestamps. times are unix seconds. The newest period is the one that contains now.

Jump to

Keyboard shortcuts

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