mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-22 09:21:32 +00:00
.circleci
.github
DOCKER
abci
benchmarks
blockchain
cmd
config
consensus
crypto
docs
evidence
libs
autofile
bech32
cli
clist
common
db
errors
errors.go
events
flowrate
log
pubsub
test
version
.editorconfig
.gitignore
CHANGELOG.md
README.md
circle.yml
test.sh
lite
mempool
networks
node
p2p
privval
proxy
rpc
scripts
state
test
tools
types
version
.editorconfig
.gitignore
CHANGELOG.md
CHANGELOG_PENDING.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Gopkg.lock
Gopkg.toml
LICENSE
Makefile
README.md
ROADMAP.md
SECURITY.md
UPGRADING.md
Vagrantfile
appveyor.yml
codecov.yml
docker-compose.yml
27 lines
602 B
Go
27 lines
602 B
Go
![]() |
// Package errors contains errors that are thrown across packages.
|
||
|
package errors
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
// ErrPermissionsChanged occurs if the file permission have changed since the file was created.
|
||
|
type ErrPermissionsChanged struct {
|
||
|
name string
|
||
|
got, want os.FileMode
|
||
|
}
|
||
|
|
||
|
func NewErrPermissionsChanged(name string, got, want os.FileMode) *ErrPermissionsChanged {
|
||
|
return &ErrPermissionsChanged{name: name, got: got, want: want}
|
||
|
}
|
||
|
|
||
|
func (e ErrPermissionsChanged) Error() string {
|
||
|
return fmt.Sprintf(
|
||
|
"file: [%v]\nexpected file permissions: %v, got: %v",
|
||
|
e.name,
|
||
|
e.want,
|
||
|
e.got,
|
||
|
)
|
||
|
}
|