test(config,git,logger): add some test functions
This commit is contained in:
parent
316e5de757
commit
1356128a7b
16 changed files with 387 additions and 25 deletions
|
@ -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...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue