layermap

command
v0.168.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

The layermap command keeps the Telegram Desktop version a client reports in step with the API layer of gotd, read from the tags of a tdesktop checkout.

A client that reports the app_version of Telegram Desktop in initConnection should report a version released on the layer it speaks (tg.Layer): a pair that no real client sends, such as a newer version on an older layer, sets the session apart. So does a session that goes on with an older version than the one that ran it before, as when a session of Telegram Desktop moves to an older client.

gen writes a table of the Desktop releases of each layer, so that the version follows the layer and updating gotd changes both:

//go:generate go run github.com/gotd/td/cmd/layermap gen -tdesktop ../../telegram/tdesktop -pkg device -o desktop_layers.go

version, ok := device.DesktopVersion(tg.Layer)

check reads the version that last ran each tdata directory and tells whether the gotd of a module may run them, which gotd release to update to, or that none is out yet:

go run github.com/gotd/td/cmd/layermap check -tdesktop ../../telegram/tdesktop ~/sessions/*/tdata

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL