json

package
v1.228.0-rc.2 Latest Latest
Warning

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

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

Documentation

Overview

Package json implements the json file manager: sjson/gjson-based in-place field writes on plain JSON files (package manifests, plugin listings, and similar), configured via `options.set: [{path, from}]`. Unlike marker (comment-annotated) or template (a *.tmpl source rendered to a sibling file), sjson.Set patches only the targeted path and leaves the rest of the document's bytes -- formatting, key order, whitespace -- untouched, so this file must never import "encoding/json" alongside the local "json" package name.

Index

Constants

View Source
const Name = "json"

Name is the manager's registry name.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct{}

Manager writes locked values into JSON files at configured field paths.

func (Manager) DefaultPaths

func (Manager) DefaultPaths() []string

DefaultPaths is empty: unlike *.tmpl files or the fixed workflows directory, there is no generically-safe default glob for "JSON files this tool owns" -- the json manager only runs over configured paths.

func (Manager) Name

func (Manager) Name() string

Name returns the manager's registry name.

func (Manager) Plan

Plan scans the configured files and returns the field writes needed to match the locked versions.

Jump to

Keyboard shortcuts

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