diff

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 7 Imported by: ? 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 diff is base/diff's DiffView in ui's colors. It is a package of its own, as base/diff is, so that only apps that show diffs link chroma's lexers. Its types are base/diff's: this package adds the look alone.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Styles

func Styles(cx *core.Scope) diff.Styles

Styles are View's styles where cx is, for a diff.DiffView the app styles further. It reads the palette, so read it where ui.Themed does.

Types

type RegionActions

type RegionActions struct {
	OnStage, OnDiscard func()
}

RegionActions are the actions on a diff.Region, for RenderRegionActions: a small button staging its lines and another discarding them, which OnDiscard confirms. Either is left out when nil.

func (RegionActions) Render

func (a RegionActions) Render(cx *core.Scope) core.Node

Render implements core.Node.

type View

type View diff.DiffView

View is diff.DiffView in ui's look: 12 point text on 18 point lines (FontSize and LineHeight replace them), added and deleted lines tinted across their gutters in MyGo's change colors, in the darker appearance more, the words changed in them over the tint, a solid bar on added lines and a dashed one on deleted lines, and gray rounded separators, buttons that show the lines they collapse. The app's Styles or StylesFunc merge over ui's, part by part.

func (View) Render

func (v View) Render(cx *core.Scope) core.Node

Render implements core.Node.

Jump to

Keyboard shortcuts

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