common

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorePrefix = "agola"
)

Variables

This section is empty.

Functions

func WriteFileAtomic

func WriteFileAtomic(filename string, data []byte, perm os.FileMode) error

WriteFileAtomic atomically writes a file

func WriteFileAtomicFunc

func WriteFileAtomicFunc(filename string, perm os.FileMode, writeFunc func(f io.Writer) error) error

WriteFileAtomicFunc atomically writes a file, it achieves this by creating a temporary file and then moving it. writeFunc is the func that will write data to the file. This function is taken from

https://github.com/youtube/vitess/blob/master/go/ioutil2/ioutil.go

Copyright 2012, Google Inc. BSD-license, see licenses/LICENSE-BSD-3-Clause

Types

This section is empty.

Jump to

Keyboard shortcuts

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