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

devmount

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package devmount owns the package a development session mounts in a Deadlock installation: its directory, its block in gameinfo.gi, and the lock that tells a live session from one that ended without unmounting. Another program that mounts content in the same game, such as a game client that refuses to start beside conflicting packages, clears a stale mount through ClearStale instead of asking the player to edit gameinfo.gi.

Index

Constants

View Source
const (
	// Name names the session's block in gameinfo.gi.
	Name = "MODLOCK DEV"
	// Dir is the game-relative directory of the session's package.
	Dir = "citadel/modlock_dev"
)

Variables

View Source
var ErrRunning = errors.New("a Modlock development session is running in this game")

ErrRunning reports that a live development session holds the mount.

Functions

func ClearStale

func ClearStale(gameDir string) error

ClearStale unmounts a block that no live session holds, and returns ErrRunning when one does. A block without a lock file came from a version before the lock and counts as stale.

func Hold

func Hold(gameDir string) (*os.File, error)

Hold marks a session live in the installation at gameDir until the returned file closes or the process exits, however it exits. Hold before mounting and close after unmounting. Several sessions may hold at once.

func Mount

func Mount(gameDir string) error

Mount adds the session's block to the installation's gameinfo.gi, replacing a block a session left that did not end cleanly.

func Path

func Path(gameDir string) string

Path returns the session's package directory in the installation at gameDir.

func Unmount

func Unmount(gameDir string) error

Unmount removes the session's block from the installation's gameinfo.gi, as it reads now, keeping every change another program made since.

Types

This section is empty.

Jump to

Keyboard shortcuts

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