Tests for CLI (#6)

* Completed List cmd and added API calls

* Minor comments and add delete code to pass linting

* Typo in descriptions

* Minor comments

* Validations

* Validations-1

* improved branch flag validation

* removed build

* working after refactory with bad names

* Command working, test not working

* Corrected creation of service

* Finalized structure using service

* Deleted tests

* cleanup

* cleanup

* cleanup

* removed space with tab

* aligned types in model.go

* Update model.go

* resolved comments

* Refactor

* removed long descriptions

* Working incomplete tests

* Completed tests

* cleanup

* checks

* PR comments

* PR comments

* minor comment issue

* minor comment issue

* updated tests to work with workflow

* Updated tests to support new option service

* Improved eror handling for list

* Improved error handling

* Upgraded go-gh

* reusing rest client error
This commit is contained in:
Deepak Dahiya
2022-07-14 02:14:03 +05:30
committed by GitHub
parent 47c4b91fe4
commit db34270ecb
11 changed files with 615 additions and 61 deletions

16
types/errors.go Normal file
View File

@@ -0,0 +1,16 @@
package types
import (
"fmt"
)
type HandledError struct {
Message string
InnerError error
}
// Allow HandledError to satisfy error interface.
func (err HandledError) Error() string {
return fmt.Sprintf(err.Message)
}