docker/errors.v

23 lines
322 B
Coq
Raw Normal View History

2022-06-22 09:15:00 +02:00
module docker
struct DockerError {
2022-12-15 11:17:51 +01:00
pub mut:
2022-06-21 20:28:25 +02:00
status int [skip]
message string
}
fn (err DockerError) code() int {
2022-06-21 20:28:25 +02:00
return err.status
}
fn (err DockerError) msg() string {
2022-06-21 20:28:25 +02:00
return err.message
}
2022-12-15 11:17:51 +01:00
fn docker_error(status int, message string) DockerError {
return DockerError{
2022-06-21 20:28:25 +02:00
status: status
message: message
2022-12-15 11:17:51 +01:00
}
}