Skip to content

Commit 196a497

Browse files
committed
README: deemphasize v1, add list of versions with import paths
This adds an overview of the version options to https://github.com/tailscale/tailscale-client-go It removes the v1 example (it's in the godoc if people want it), lists v2 first, put provides godoc to both. This is the information I look for first when looking at a GitHub README for a Go project. Signed-off-by: Brad Fitzpatrick <[email protected]>
1 parent 6673a1d commit 196a497

File tree

1 file changed

+8
-30
lines changed

1 file changed

+8
-30
lines changed

README.md

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,17 @@
11
# tailscale-client-go
22

3-
[![Go Reference](https://pkg.go.dev/badge/github.com/tailscale/tailscale-client-go.svg)](https://pkg.go.dev/github.com/tailscale/tailscale-client-go)
4-
[![Go Report Card](https://goreportcard.com/badge/github.com/tailscale/tailscale-client-go)](https://goreportcard.com/report/github.com/tailscale/tailscale-client-go)
5-
![Github Actions](https://github.com/tailscale/tailscale-client-go/actions/workflows/ci.yml/badge.svg?branch=master)
3+
A Go client implementation for the [Tailscale API](https://tailscale.com/api).
64

7-
DEPRECATED - V1 is no longer being maintained. The [V2 SDK](v2) provides a more complete wrapper around the V2 [Tailscale API](https://tailscale.com/api).
5+
## Current Version
86

9-
---
7+
* [V2](https://github.com/tailscale/tailscale-client-go/tree/main/v2#readme): `import "github.com/tailscale/tailscale-client-go/v2"`
108

11-
A client implementation for the [Tailscale](https://tailscale.com) HTTP API.
12-
For more details, please see [API documentation](https://github.com/tailscale/tailscale/blob/main/api.md).
9+
[![Go Reference](https://pkg.go.dev/badge/github.com/tailscale/tailscale-client-go.svg)](https://pkg.go.dev/github.com/tailscale/tailscale-client-go/v2)
1310

14-
# Example
11+
## Old versions
1512

16-
```go
17-
package main
13+
* V1: `import "github.com/tailscale/tailscale-client-go"`
1814

19-
import (
20-
"context"
21-
"log"
22-
"os"
15+
Deprecated, no longer maintained.
2316

24-
"github.com/tailscale/tailscale-client-go/tailscale"
25-
)
26-
27-
func main() {
28-
apiKey := os.Getenv("TAILSCALE_API_KEY")
29-
tailnet := os.Getenv("TAILSCALE_TAILNET")
30-
31-
client, err := tailscale.NewClient(apiKey, tailnet)
32-
if err != nil {
33-
log.Fatalln(err)
34-
}
35-
36-
// List all your devices
37-
devices, err := client.Devices(context.Background())
38-
}
39-
```
17+
[![Go Reference](https://pkg.go.dev/badge/github.com/tailscale/tailscale-client-go.svg)](https://pkg.go.dev/github.com/tailscale/tailscale-client-go)

0 commit comments

Comments
 (0)