# README
TGBot
DevOps application from scratch
TGBot is a Telegram bot written in the Go programming language, utilizing the Cobra-CLI v1.8.0 framework for command handling and Telebot v3.1.4 for integration with the Telegram API.
Installation
To get started with KBot, clone the repository:
git clone https://github.com/albiorixUA/devops-k8s-demo.git
cd devops-k8s-demo
To install all necessary dependencies and compile the project, use:
go get
go build -ldflags "-X="github.com/albiorixUA/devops-k8s-demo/cmd.appVersion=v1.0.2
To test the compiled project, do the following:
./tgbot version
as a result, you should get the app's version v1.0.2
.
Configuration
Enter your Telegram bot token in silent mode:
read -s TELE_TOKEN
Export the value of the TELE TOKEN variable to the current shell environment.
export TELE_TOKEN
Running
Run KBot using the following command:
./tgbot start
Link to Telegram bot
Usage
This project uses a Makefile for common tasks. Run the following commands:
- Format Code:
make format
- Lint Code:
make lint
- Run Tests:
make test
- Get Dependencies:
make get
- Build Application:
make build
(OverrideREGISTRY
,TARGETOS
andTARGETARCH
withmake build REGISTRY=albiorixua TARGETOS=windows TARGETARCH=amd64
) - Create Docker Image:
make image
(OverrideREGISTRY
,TARGETOS
andTARGETARCH
withmake image REGISTRY=albiorixua TARGETOS=windows TARGETARCH=amd64
) - Push Docker Image:
make push
(OverrideREGISTRY
,TARGETOS
andTARGETARCH
withmake push REGISTRY=albiorixua TARGETOS=windows TARGETARCH=amd64
) - Clean:
make clean
# Packages
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
*/.