Debian Codegraph @

debian/control

raw
1 Source: golang-github-natefinch-atomic
2 Section: golang
3 Priority: optional
4 Maintainer: Debian Go Packaging Team <[email protected]>
5 Uploaders: Taavi Väänänen <[email protected]>,
6 Rules-Requires-Root: no
7 Build-Depends: debhelper-compat (= 13),
8 dh-sequence-golang,
9 golang-any,
10 Testsuite: autopkgtest-pkg-go
11 Standards-Version: 4.7.2
12 Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-github-natefinch-atomic
13 Vcs-Git: https://salsa.debian.org/go-team/packages/golang-github-natefinch-atomic.git
14 Homepage: https://github.com/natefinch/atomic
15 XS-Go-Import-Path: github.com/natefinch/atomic
16
17 Package: golang-github-natefinch-atomic-dev
18 Architecture: all
19 Multi-Arch: foreign
20 Depends: ${misc:Depends},
21 Description: Go package for atomic file writing (library)
22 atomic is a go package for atomic file writing.
23 .
24 By default, writing to a file in go (and generally any language) can
25 fail partway through... you then have a partially written file, which
26 probably was truncated when the write began, and bam, now you've lost
27 data.
28 .
29 This go package avoids this problem, by writing first to a temp file,
30 and then overwriting the target file in an atomic way. This is easy on
31 linux, os.Rename just is atomic. However, on Windows, os.Rename is not
32 atomic, and so bad things can happen. By wrapping the windows API
33 moveFileEx, we can ensure that the move is atomic, and we can be safe in
34 knowing that either the move succeeds entirely, or neither file will be
35 modified.