Skip to content

Commit 79ea096

Browse files
committed
changes:
- minor refactoring and improvements - added docs
1 parent 4266fa2 commit 79ea096

7 files changed

Lines changed: 19 additions & 14 deletions

File tree

β€ŽGNUmakefileβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ test:
66
go test ./...
77

88
golangci-lint:
9-
@sh -c "'$(CURDIR)/scripts/golangci_lint_check.sh'"
9+
docker run --rm -v $(PWD):/app:ro -w /app golangci/golangci-lint:v2.1.6 golangci-lint run
1010

1111
.PHONY: tests unittest golangci-lint

β€Žpkg/httptest/doc.goβ€Ž

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Package httptest provides helpers for testing HTTP clients.
2+
//
3+
// It offers:
4+
// - RoundTripFunc to stub http.RoundTripper
5+
// - NewFakeResponse to build *http.Response with a status/body
6+
// - NewFakeTransport to return a transport that yields a fixed response/error
7+
//
8+
// These utilities simplify unit tests by avoiding real network calls.
9+
package httptest

β€Žpkg/v2/client.options.goβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package v2
22

33
type ServiceClientOption func(*ServiceClient)
44

5-
func UserAgentServiceClientOption(userAgent string) ServiceClientOption {
5+
func WithUserAgent(userAgent string) ServiceClientOption {
66
return func(client *ServiceClient) {
77
client.userAgent = userAgent
88
}

β€Žpkg/v2/doc.goβ€Ž

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Package v2 provides a Go client for the Selectel Dedicated Servers API (v2).
2+
//
3+
// It exposes an HTTP client with token-based authentication (X-Auth-Token),
4+
// request helpers, and response extraction utilities to interact with the
5+
// Dedicated Servers API.
6+
//
7+
// Official documentation: https://docs.selectel.ru/en/dedicated/
8+
package v2

β€Žscripts/golangci_lint_check.shβ€Ž

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
Β (0)