sessionname

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sessionname creates stable display names for Codog sessions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderJSON

func RenderJSON(out io.Writer, report Report) error

func RenderText

func RenderText(out io.Writer, report Report)

func Suggest

func Suggest(text string, options Options) string

func Unique

func Unique(base string, exists func(string) (bool, error)) (string, int, error)

Types

type Options

type Options struct {
	Prefix    string
	MaxWords  int
	MaxLength int
}

type Report

type Report struct {
	Kind           string   `json:"kind"`
	Action         string   `json:"action"`
	Status         string   `json:"status"`
	SessionID      string   `json:"session_id"`
	SuggestedID    string   `json:"suggested_id"`
	Source         string   `json:"source"`
	SourceText     string   `json:"source_text,omitempty"`
	MessageCount   int      `json:"message_count"`
	CollisionCount int      `json:"collision_count"`
	Renamed        bool     `json:"renamed"`
	OldID          string   `json:"old_id,omitempty"`
	NewID          string   `json:"new_id,omitempty"`
	Path           string   `json:"path,omitempty"`
	Messages       []string `json:"messages,omitempty"`
}

Jump to

Keyboard shortcuts

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