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

gameinfo

package
v0.1.33 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package gameinfo edits the search paths in a Source 2 game's gameinfo.gi, which several programs share: Steam, mod managers and tools that mount content for a while. Each tool's paths sit in a block between its own marker comments, and a tool removes exactly the lines it wrote, keeping every other byte of the file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(source []byte, name string, paths ...string) ([]byte, error)

Mount returns source with the block of the tool named name holding paths as Game search paths, replacing the tool's earlier block. The block goes on its own line ahead of every other Game path and other tools' blocks, so its files win while it is mounted. The block also names the engine's Mod and Write paths, which the engine would otherwise take from its first path: the ones the file already names, or else the Game path that came first.

func Unmount

func Unmount(source []byte, name string) ([]byte, error)

Unmount returns source without the block of the tool named name: its marker lines and the Game, Mod and Write lines between them. Any other line another program put inside the block stays.

Types

This section is empty.

Jump to

Keyboard shortcuts

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