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

managed

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package managed holds the overlay files Ghostbranch writes and keeps up to date (today only the opt-in sync workflow), and decides whether the copy on an overlay branch is current.

Index

Constants

View Source
const (
	// SyncPath is the opt-in scheduled sync workflow.
	SyncPath = ".github/workflows/ghostbranch-sync.yml"

	SyncVersion = 1
)

Variables

This section is empty.

Functions

func Describe

func Describe() string

Describe names the managed templates and versions, for commit messages.

func Paths

func Paths() []string

Paths lists every managed path, wanted or not.

func Render

func Render(in Input) map[string][]byte

Render returns the bytes the config wants at each managed path. A path missing from the map must not exist on the overlay branch.

func Script

func Script() string

Script is the embedded sync script.

Types

type Input

type Input struct {
	Public   string
	Schedule string
	Branches []string
}

Input is the config a render depends on. Schedule "off" means scheduled sync is not wanted, so the sync workflow must not exist.

type Status

type Status string
const (
	Current  Status = "current"
	Missing  Status = "missing"
	Outdated Status = "outdated"
	Modified Status = "modified"
	// Newer: a newer binary wrote it; this one leaves it alone.
	Newer Status = "newer"
)

func StatusOf

func StatusOf(path string, cur []byte, exists bool, in Input) Status

StatusOf classifies the copy of path on the overlay branch.

Jump to

Keyboard shortcuts

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