xxxxxxxxxx
/* install with terminal
go get -u github.com/gin-gonic/gin
or
go install github.com/gin-gonic/gin@latest
*/
package main
import "github.com/gin-gonic/gin"
func main() {
r := gin.Default()
r.GET("/ping", func(c *gin.Context) {
c.JSON(200, gin.H{
"message": "pong",
})
})
r.Run() // listen and serve on 0.0.0.0:8080
}
xxxxxxxxxx
$ pactl list short sources
0 alsa_output.pci-0000_02_02.0.analog-stereo.monitor
1 alsa_input.pci-0000_02_02.0.analog-stereo
pactl set-source-mute 1 toggle