mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-16 05:26:31 +00:00
2d66cfcce2
All the client functions were in a single file, which was already very long, and the test file gets even longer as more tests are added. I split it into separate files representing the API path and started adding some tests.
13 lines
255 B
Go
13 lines
255 B
Go
package woodpecker
|
|
|
|
import "fmt"
|
|
|
|
const pathQueue = "%s/api/queue"
|
|
|
|
// QueueInfo returns queue info.
|
|
func (c *client) QueueInfo() (*Info, error) {
|
|
out := new(Info)
|
|
uri := fmt.Sprintf(pathQueue+"/info", c.addr)
|
|
err := c.get(uri, out)
|
|
return out, err
|
|
}
|