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

utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsJoinPath

func AbsJoinPath(root string, rel ...string) string

AbsJoinPath joins an OS absolute root with Unix-style relative path segments. root is kept as-is (typically from App.Root()), rel segments are FromSlash-converted.

func BytesLF

func BytesLF(data []byte) []byte

BytesLF normalizes \r\n and isolated \r to \n.

func JoinPath

func JoinPath(segments ...string) string

JoinPath joins Unix-style relative path segments into an OS-native path. Input segments may use forward slashes (developer convention). Output is an OS-native path suitable for os.Open, os.Stat, etc. For absolute root + relative path, use AbsJoinPath instead.

func SlashPath

func SlashPath(osPath string) string

SlashPath converts an OS-native path to Unix-style forward-slash path. Use when returning paths to developers (JS bridge, Dict name, API routes, etc.).

func StringLF

func StringLF(s string) string

StringLF normalizes \r\n and isolated \r to \n (string variant).

Types

This section is empty.

Jump to

Keyboard shortcuts

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