test(config,git,logger): add some test functions
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test unknown status
ci/woodpecker/push/build unknown status
ci/woodpecker/push/deploy unknown status

This commit is contained in:
Tom Neuber 2024-12-06 23:56:18 +01:00
parent 2e41d3d004
commit b22d060cc6
Signed by: tom
GPG key ID: F17EFE4272D89FF6
16 changed files with 419 additions and 25 deletions

View file

@ -74,7 +74,7 @@ func (c *DashboardVersionClient) Get(
version uint,
params ...DashboardVersionParam,
) (*DashboardVersion, *Response, error) {
if id, err := strconv.Atoi(input); err == nil {
if id, err := strconv.ParseUint(input, 10, 64); err == nil {
return c.GetByID(ctx, uint(id), version, params...)
}
return c.GetByUID(ctx, input, version, params...)
@ -111,7 +111,7 @@ func (c *DashboardVersionClient) List(
input string,
params ...DashboardVersionParam,
) ([]*DashboardVersion, *Response, error) {
if id, err := strconv.Atoi(input); err == nil {
if id, err := strconv.ParseUint(input, 10, 64); err == nil {
return c.ListByID(ctx, uint(id), params...)
}
return c.ListByUID(ctx, input, params...)