You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/drive
Joe Tsai fbb91758ac
cmd/viewer, types/views: implement support for json/v2 (#16852)
This adds support for having every viewer type implement
jsonv2.MarshalerTo and jsonv2.UnmarshalerFrom.

This provides a significant boost in performance
as the json package no longer needs to validate
the entirety of the JSON value outputted by MarshalJSON,
nor does it need to identify the boundaries of a JSON value
in order to call UnmarshalJSON.

For deeply nested and recursive MarshalJSON or UnmarshalJSON calls,
this can improve runtime from O(N²) to O(N).

This still references "github.com/go-json-experiment/json"
instead of the experimental "encoding/json/v2" package
now available in Go 1.25 under goexperiment.jsonv2
so that code still builds without the experiment tag.
Of note, the "github.com/go-json-experiment/json" package
aliases the standard library under the right build conditions.

Updates tailscale/corp#791

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
4 months ago
..
driveimpl drive/driveimpl: use sudo or su to run file server 4 months ago
drive_clone.go tailscale: update tailfs file and package names (#11590) 2 years ago
drive_view.go cmd/viewer, types/views: implement support for json/v2 (#16852) 4 months ago
local.go drive,ipn/ipnlocal: calculate peer taildrive URLs on-demand 5 months ago
remote.go drive: use secret token to authenticate access to file server on localhost 2 years ago
remote_nonunix.go tailscale: update tailfs file and package names (#11590) 2 years ago
remote_permissions.go drive: fix minor typos in comments 8 months ago
remote_permissions_test.go tailscale: update tailfs file and package names (#11590) 2 years ago
remote_test.go drive: move normalizeShareName into pkg drive and make func public (#11638) 2 years ago
remote_unix.go tailscale: update tailfs file and package names (#11590) 2 years ago