dotfile

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 9 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 dotfile provides operations on the application dot file.

The dot file stores a build identifier of the form "version/edition" (e.g. "v0.160.0/extended"). Files written by older versions of hvm contain only a version string; Read migrates these automatically.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles operations on the dot file.

func NewManager

func NewManager(filePath, fileName, appName, defaultEdition string) *Manager

NewManager creates a new dotfile manager. defaultEdition is used when migrating dot files written by older versions of hvm that contain only a version string.

func (*Manager) Read

func (m *Manager) Read() (string, error)

Read reads the build identifier ("version/edition") from the dot file in the current directory, or returns an empty string if the file does not exist.

If the file contains only a version (written by an older version of hvm), Read migrates it to the version/edition format, rewrites the file, and prints a warning to stderr.

func (*Manager) Write

func (m *Manager) Write(version string) error

Write writes the version to the dot file for the current directory.

Jump to

Keyboard shortcuts

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