@@ -294,7 +294,7 @@ func (lc *Client) get200(ctx context.Context, path string) ([]byte, error) {
294294
295295// WhoIs returns the owner of the remoteAddr, which must be an IP or IP:port.
296296//
297- // Deprecated: use Client.WhoIs.
297+ // Deprecated: use [ Client.WhoIs] .
298298func WhoIs (ctx context.Context , remoteAddr string ) (* apitype.WhoIsResponse , error ) {
299299 return defaultClient .WhoIs (ctx , remoteAddr )
300300}
@@ -309,7 +309,7 @@ func decodeJSON[T any](b []byte) (ret T, err error) {
309309
310310// WhoIs returns the owner of the remoteAddr, which must be an IP or IP:port.
311311//
312- // If not found, the error is ErrPeerNotFound.
312+ // If not found, the error is [ ErrPeerNotFound] .
313313//
314314// For connections proxied by tailscaled, this looks up the owner of the given
315315// address as TCP first, falling back to UDP; if you want to only check a
@@ -325,7 +325,8 @@ func (lc *Client) WhoIs(ctx context.Context, remoteAddr string) (*apitype.WhoIsR
325325 return decodeJSON [* apitype.WhoIsResponse ](body )
326326}
327327
328- // ErrPeerNotFound is returned by WhoIs and WhoIsNodeKey when a peer is not found.
328+ // ErrPeerNotFound is returned by [Client.WhoIs], [Client.WhoIsNodeKey] and
329+ // [Client.WhoIsProto] when a peer is not found.
329330var ErrPeerNotFound = errors .New ("peer not found" )
330331
331332// WhoIsNodeKey returns the owner of the given wireguard public key.
@@ -345,7 +346,7 @@ func (lc *Client) WhoIsNodeKey(ctx context.Context, key key.NodePublic) (*apityp
345346// WhoIsProto returns the owner of the remoteAddr, which must be an IP or
346347// IP:port, for the given protocol (tcp or udp).
347348//
348- // If not found, the error is ErrPeerNotFound.
349+ // If not found, the error is [ ErrPeerNotFound] .
349350func (lc * Client ) WhoIsProto (ctx context.Context , proto , remoteAddr string ) (* apitype.WhoIsResponse , error ) {
350351 body , err := lc .get200 (ctx , "/localapi/v0/whois?proto=" + url .QueryEscape (proto )+ "&addr=" + url .QueryEscape (remoteAddr ))
351352 if err != nil {
@@ -490,7 +491,7 @@ func (lc *Client) BugReportWithOpts(ctx context.Context, opts BugReportOpts) (st
490491
491492// BugReport logs and returns a log marker that can be shared by the user with support.
492493//
493- // This is the same as calling BugReportWithOpts and only specifying the Note
494+ // This is the same as calling [Client. BugReportWithOpts] and only specifying the Note
494495// field.
495496func (lc * Client ) BugReport (ctx context.Context , note string ) (string , error ) {
496497 return lc .BugReportWithOpts (ctx , BugReportOpts {Note : note })
@@ -531,7 +532,7 @@ func (lc *Client) DebugResultJSON(ctx context.Context, action string) (any, erro
531532 return x , nil
532533}
533534
534- // DebugPortmapOpts contains options for the DebugPortmap command.
535+ // DebugPortmapOpts contains options for the [Client. DebugPortmap] command.
535536type DebugPortmapOpts struct {
536537 // Duration is how long the mapping should be created for. It defaults
537538 // to 5 seconds if not set.
@@ -677,7 +678,7 @@ func (lc *Client) WaitingFiles(ctx context.Context) ([]apitype.WaitingFile, erro
677678 return lc .AwaitWaitingFiles (ctx , 0 )
678679}
679680
680- // AwaitWaitingFiles is like WaitingFiles but takes a duration to await for an answer.
681+ // AwaitWaitingFiles is like [Client. WaitingFiles] but takes a duration to await for an answer.
681682// If the duration is 0, it will return immediately. The duration is respected at second
682683// granularity only. If no files are available, it returns (nil, nil).
683684func (lc * Client ) AwaitWaitingFiles (ctx context.Context , d time.Duration ) ([]apitype.WaitingFile , error ) {
@@ -946,7 +947,7 @@ func (lc *Client) SetDNS(ctx context.Context, name, value string) error {
946947// The host may be a base DNS name (resolved from the netmap inside
947948// tailscaled), a FQDN, or an IP address.
948949//
949- // The ctx is only used for the duration of the call, not the lifetime of the net.Conn.
950+ // The ctx is only used for the duration of the call, not the lifetime of the [ net.Conn] .
950951func (lc * Client ) DialTCP (ctx context.Context , host string , port uint16 ) (net.Conn , error ) {
951952 return lc .UserDial (ctx , "tcp" , host , port )
952953}
@@ -957,7 +958,7 @@ func (lc *Client) DialTCP(ctx context.Context, host string, port uint16) (net.Co
957958// a FQDN, or an IP address.
958959//
959960// The ctx is only used for the duration of the call, not the lifetime of the
960- // net.Conn.
961+ // [ net.Conn] .
961962func (lc * Client ) UserDial (ctx context.Context , network , host string , port uint16 ) (net.Conn , error ) {
962963 connCh := make (chan net.Conn , 1 )
963964 trace := httptrace.ClientTrace {
@@ -1025,7 +1026,7 @@ func (lc *Client) CurrentDERPMap(ctx context.Context) (*tailcfg.DERPMap, error)
10251026//
10261027// It returns a cached certificate from disk if it's still valid.
10271028//
1028- // Deprecated: use Client.CertPair.
1029+ // Deprecated: use [ Client.CertPair] .
10291030func CertPair (ctx context.Context , domain string ) (certPEM , keyPEM []byte , err error ) {
10301031 return defaultClient .CertPair (ctx , domain )
10311032}
@@ -1072,9 +1073,9 @@ func (lc *Client) CertPairWithValidity(ctx context.Context, domain string, minVa
10721073// It returns a cached certificate from disk if it's still valid.
10731074//
10741075// It's the right signature to use as the value of
1075- // tls.Config.GetCertificate.
1076+ // [ tls.Config.GetCertificate] .
10761077//
1077- // Deprecated: use Client.GetCertificate.
1078+ // Deprecated: use [ Client.GetCertificate] .
10781079func GetCertificate (hi * tls.ClientHelloInfo ) (* tls.Certificate , error ) {
10791080 return defaultClient .GetCertificate (hi )
10801081}
@@ -1084,7 +1085,7 @@ func GetCertificate(hi *tls.ClientHelloInfo) (*tls.Certificate, error) {
10841085// It returns a cached certificate from disk if it's still valid.
10851086//
10861087// It's the right signature to use as the value of
1087- // tls.Config.GetCertificate.
1088+ // [ tls.Config.GetCertificate] .
10881089//
10891090// API maturity: this is considered a stable API.
10901091func (lc * Client ) GetCertificate (hi * tls.ClientHelloInfo ) (* tls.Certificate , error ) {
@@ -1113,7 +1114,7 @@ func (lc *Client) GetCertificate(hi *tls.ClientHelloInfo) (*tls.Certificate, err
11131114
11141115// ExpandSNIName expands bare label name into the most likely actual TLS cert name.
11151116//
1116- // Deprecated: use Client.ExpandSNIName.
1117+ // Deprecated: use [ Client.ExpandSNIName] .
11171118func ExpandSNIName (ctx context.Context , name string ) (fqdn string , ok bool ) {
11181119 return defaultClient .ExpandSNIName (ctx , name )
11191120}
@@ -1502,7 +1503,7 @@ func (lc *Client) SwitchProfile(ctx context.Context, profile ipn.ProfileID) erro
15021503
15031504// DeleteProfile removes the profile with the given ID.
15041505// If the profile is the current profile, an empty profile
1505- // will be selected as if SwitchToEmptyProfile was called.
1506+ // will be selected as if [Client. SwitchToEmptyProfile] was called.
15061507func (lc * Client ) DeleteProfile (ctx context.Context , profile ipn.ProfileID ) error {
15071508 _ , err := lc .send (ctx , "DELETE" , "/localapi/v0/profiles/" + url .PathEscape (string (profile )), http .StatusNoContent , nil )
15081509 return err
@@ -1559,7 +1560,7 @@ func (lc *Client) DebugSetExpireIn(ctx context.Context, d time.Duration) error {
15591560// StreamDebugCapture streams a pcap-formatted packet capture.
15601561//
15611562// The provided context does not determine the lifetime of the
1562- // returned io.ReadCloser.
1563+ // returned [ io.ReadCloser] .
15631564func (lc * Client ) StreamDebugCapture (ctx context.Context ) (io.ReadCloser , error ) {
15641565 req , err := http .NewRequestWithContext (ctx , "POST" , "http://" + apitype .LocalAPIHost + "/localapi/v0/debug-capture" , nil )
15651566 if err != nil {
@@ -1582,7 +1583,7 @@ func (lc *Client) StreamDebugCapture(ctx context.Context) (io.ReadCloser, error)
15821583// The context is used for the life of the watch, not just the call to
15831584// WatchIPNBus.
15841585//
1585- // The returned IPNBusWatcher's Close method must be called when done to release
1586+ // The returned [ IPNBusWatcher] 's Close method must be called when done to release
15861587// resources.
15871588//
15881589// A default set of ipn.Notify messages are returned but the set can be modified by mask.
@@ -1609,7 +1610,7 @@ func (lc *Client) WatchIPNBus(ctx context.Context, mask ipn.NotifyWatchOpt) (*IP
16091610 }, nil
16101611}
16111612
1612- // CheckUpdate returns a tailcfg.ClientVersion indicating whether or not an update is available
1613+ // CheckUpdate returns a [* tailcfg.ClientVersion] indicating whether or not an update is available
16131614// to be installed via the LocalAPI. In case the LocalAPI can't install updates, it returns a
16141615// ClientVersion that says that we are up to date.
16151616func (lc * Client ) CheckUpdate (ctx context.Context ) (* tailcfg.ClientVersion , error ) {
@@ -1685,7 +1686,7 @@ func (lc *Client) DriveShareList(ctx context.Context) ([]*drive.Share, error) {
16851686}
16861687
16871688// IPNBusWatcher is an active subscription (watch) of the local tailscaled IPN bus.
1688- // It's returned by Client.WatchIPNBus.
1689+ // It's returned by [ Client.WatchIPNBus] .
16891690//
16901691// It must be closed when done.
16911692type IPNBusWatcher struct {
0 commit comments