varlink / go

Golang implementation of the Varlink protocol
https://godoc.org/github.com/varlink/go/varlink
Apache License 2.0
55 stars 57 forks source link

Add more detailed errors #13

Closed johanbrandhorst closed 4 years ago

johanbrandhorst commented 4 years ago

Fixes #10

johanbrandhorst commented 4 years ago

This produces the following code:

// PodContainerError means a container associated with a pod failed to perform an operation. It contains
// a container ID of the container that failed.
type PodContainerError struct {
    Podname string                  `json:"podname"`
    Errors  []PodContainerErrorData `json:"errors"`
}

func (e PodContainerError) Error() string {
    s := "io.podman.PodContainerError"
    s += fmt.Sprintf("(Podname: %v, Errors: %v)", e.Podname, e.Errors)
    return s
}
coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 329


Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/varlink-go-interface-generator/main.go 24 26 92.31%
<!-- Total: 24 26 92.31% -->
Totals Coverage Status
Change from base Build 327: 0.5%
Covered Lines: 1186
Relevant Lines: 1426

💛 - Coveralls
coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 336


Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/varlink-go-interface-generator/main.go 18 22 81.82%
<!-- Total: 18 22 81.82% -->
Totals Coverage Status
Change from base Build 335: 0.2%
Covered Lines: 587
Relevant Lines: 709

💛 - Coveralls
johanbrandhorst commented 4 years ago

Friendly bump.