Examples and usage of GoTermux:
GoTermux
gives you the opportunity to execute your scripts in Termux
using Golang
. All from Go
and Termux API
features in your hands!
- GoTermux package
Calling termux command from golang looks just like in termux cmd, but without dash (-
).
Example:
// Termux CMD:
termux-battery-status
// Golang:
TermuxBatteryStatus()
Code examples can be found at: gotermux.mysh.dev!
Or here: now.sh
Use F-droid or Google Play to install Termux API.
Do not mix installations of Termux and Addons between Google Play and F-Droid.
To use Termux API you also need to install the termux-api package:
pkg install termux-api
First of all you need install golang:
pkg install golang
And then:
go get -u github.com/hugmouse/gotermux