ox

package module
v0.0.0-...-12c6ca1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: MIT Imports: 9 Imported by: 26

README

ox

build status codecov Go Report Card GoDoc MIT licensed

ox contains:

  • Package syscallex: the missing parts of syscall
  • Package winox: convenient wrappers for some Win32 APIs
  • Package macox: convenient wrappers for some Cocoa APIs

License

Licensed under MIT License, see LICENSE for details.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SIMULATE_FALLOCATE_NOT_SUPPORTED = false

Functions

func Fallocate

func Fallocate(file *os.File, offset int64, length int64) error

func Preallocate

func Preallocate(f *os.File, size int64) error

Reserve `size` bytes of space for f, in the quickest way possible. f must be opened with O_RDWR.

Types

type Platform

type Platform string
const (
	PlatformOSX     Platform = "osx"
	PlatformWindows Platform = "windows"
	PlatformLinux   Platform = "linux"
	PlatformUnknown Platform = "unknown"
)

these coincide with the namings used in the itch.io backend

type Runtime

type Runtime struct {
	Platform Platform `json:"platform"`
	Is64     bool     `json:"is64"`
}

Runtime describes an os-arch combo in a convenient way

func CurrentRuntime

func CurrentRuntime() Runtime

func (Runtime) Arch

func (r Runtime) Arch() string

Arch returns the architecture in GOARCH format

func (Runtime) Equals

func (r Runtime) Equals(other Runtime) bool

func (Runtime) OS

func (r Runtime) OS() string

OS returns the operating system in GOOS format

func (Runtime) String

func (r Runtime) String() string

type Runtimes

type Runtimes []Runtime

func (Runtimes) HasPlatform

func (rs Runtimes) HasPlatform(platform Platform) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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