Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telego v1.0.0 #242

Merged
merged 46 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e4cb970
Added context to methods
mymmrac Jan 16, 2025
930e237
Updated methods to accept context
mymmrac Jan 16, 2025
d54654a
Updated bot to accept context
mymmrac Jan 16, 2025
346771a
Fixed tests
mymmrac Jan 16, 2025
33a1de2
Updated linters
mymmrac Jan 16, 2025
0abca8c
Updated bot options
mymmrac Jan 16, 2025
7b61f65
Updated setters
mymmrac Jan 16, 2025
65417af
Updated long polling
mymmrac Jan 17, 2025
bce847b
Updated webhook
mymmrac Jan 18, 2025
386b1ea
Fixes integration tests
mymmrac Jan 18, 2025
c377204
Clean-up go.mod
mymmrac Jan 18, 2025
db572fe
Added vuln check
mymmrac Jan 18, 2025
5d001a5
Removed handlers without context
mymmrac Jan 18, 2025
41a6d43
Updated errors
mymmrac Jan 18, 2025
e4e8d70
Updated bot handler
mymmrac Jan 22, 2025
8dbca7a
Updated bot handler
mymmrac Jan 24, 2025
e66549a
Long polling copy params
mymmrac Jan 24, 2025
983983f
Always close body in webhook
mymmrac Jan 24, 2025
926039c
Replace mutex with atomic
mymmrac Jan 24, 2025
3496a87
Added update types
mymmrac Jan 24, 2025
347dc62
Added bot handlers
mymmrac Jan 24, 2025
6a7b7af
Added TRX wallet for funding
mymmrac Jan 25, 2025
609d8f7
Added ETH wallet for funding
mymmrac Jan 25, 2025
5534e82
Updated dependencies
mymmrac Jan 26, 2025
68b1f0f
Precompute route depth
mymmrac Jan 26, 2025
39d52e5
Bot handler updated on stop error
mymmrac Jan 28, 2025
b8eb800
Bot ID and username methods
mymmrac Jan 28, 2025
66e6871
Added AnyCommandToMe predicate
mymmrac Jan 29, 2025
c11f2d2
Fix Taskfile
mymmrac Jan 29, 2025
1b91075
Updated interactive test
mymmrac Jan 30, 2025
c787d00
Added inline query interactive test
mymmrac Jan 30, 2025
ac727f0
Update telegoapi docs
mymmrac Jan 30, 2025
0637137
Update telegoutil docs
mymmrac Jan 30, 2025
2325b55
Update telegohandler docs
mymmrac Jan 30, 2025
9993830
Update telego docs
mymmrac Jan 30, 2025
274a56a
Added tests
mymmrac Jan 30, 2025
2e8b30b
Updated README
mymmrac Jan 30, 2025
f7c25ee
Updated examples
mymmrac Feb 2, 2025
2f8d8f9
Simplified bot health check
mymmrac Feb 3, 2025
2c576ed
Stabilized tests
mymmrac Feb 3, 2025
cb93036
Added forward messages interactive test
mymmrac Feb 17, 2025
1c3ee93
Updated dependencies
mymmrac Feb 19, 2025
786bca6
Get underling context
mymmrac Feb 19, 2025
e6a09bf
Updated WithContext logic
mymmrac Feb 19, 2025
900fe03
Updated WithContext logic (added context base)
mymmrac Feb 19, 2025
ecba325
Context.WithXXX always returns new value
mymmrac Feb 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: "mymmrac" # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
patreon: "mymmrac"
custom: [
"https://tronscan.org/#/address/TW6sjDnGbTSpztXrASfD2Pt4JnBqmphRah",
"https://etherscan.io/address/0x45f57E685Ec43053f6803491e7347B95C9573b8A",
]
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ updates:
schedule:
interval: "weekly"
labels:
- ":gear: Github Actions"
- ":gear: GitHub Actions"
- ":shamrock: Dependencies"
64 changes: 22 additions & 42 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ linters:
enable-all: true
disable:
# Disabled because not relevant for this project
- cyclop # Checks function and package cyclomatic complexity
- containedctx # containedctx is a linter that detects struct contained context.Context field
- depguard # Go linter that checks if package imports are in a list of acceptable packages
- dupword # checks for duplicate words in the source code
Expand All @@ -29,42 +30,22 @@ linters:
- wsl # Whitespace Linter - Forces you to use empty lines!

# Disabled because deprecated
- exportloopref # An analyzer that finds exporting pointers for loop variables
- tenv # Tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17

# To see a list of enabled/disabled by current configuration linters:
# golangci-lint linters

# Settings of specific linters
linters-settings:
govet: # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not
# align with the format string
asmdecl: true # report mismatches between assembly files and Go declarations
assign: true # check for useless assignments
atomic: true # check for common mistakes using the sync/atomic package
bools: true # check for common mistakes involving boolean operators
buildtag: true # check that +build tags are well-formed and correctly located
cgocall: true # detect some violations of the cgo pointer passing rules
composites: true # check for unkeyed composite literals
copylocks: true # check for locks erroneously passed by value
errorsas: true # report passing non-pointer or non-error values to errors.As
framepointer: true # report assembly that clobbers the frame pointer before saving it
httpresponse: true # check for mistakes using HTTP responses
ifaceassert: true # detect impossible interface-to-interface type assertions
loopclosure: true # check references to loop variables from within nested functions
lostcancel: true # check cancel func returned by context.WithCancel is called
nilfunc: true # check for useless comparisons between functions and nil
printf: true # check consistency of Printf format strings and arguments
shift: true # check for shifts that equal or exceed the width of the integer
sigchanyzer: true # check for unbuffered channel of os.Signal
stdmethods: true # check signature of methods of well-known interfaces
stringintconv: true # check for string(int) conversions
structtag: true # check that struct field tags conform to reflect.StructTag.Get
testinggoroutine: true # report calls to (*testing.T).Fatal from goroutines started by a test.
tests: true # check for common mistaken usages of tests and examples
unmarshal: true # report passing non-pointer or non-interface values to unmarshal
unreachable: true # check for unreachable code
unsafeptr: true # check for invalid conversions of uintptr to unsafe.Pointer
unusedresult: true # check for unused results of calls to some functions
# Enable all analyzers.
# Default: false
enable-all: true
# Disable analyzers by name.
# Run `go tool vet help` to see all analyzers.
# Default: []
disable:
- fieldalignment # check for struct field alignments
gocyclo: # Computes and checks the cyclomatic complexity of functions
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 15
Expand Down Expand Up @@ -104,9 +85,6 @@ linters-settings:
# Make an issue if func has more lines of code than this setting, and it has naked returns; default is 30
# decided to use 3 to exclude long functions with named returns which can be a potential source of many errors / bugs
max-func-lines: 3
staticcheck: # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
# Include tests in the analysis.
tests: true
funlen: # Tool for detection of long functions
lines: 120
statements: 40
Expand Down Expand Up @@ -137,9 +115,7 @@ linters-settings:
disabled: true
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cognitive-complexity
- name: cognitive-complexity
severity: warning
disabled: false
arguments: [ 20 ]
disabled: true # Duplicate: gocognit
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#comment-spacings
- name: comment-spacings
severity: warning
Expand All @@ -148,9 +124,7 @@ linters-settings:
- nolint
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#cyclomatic
- name: cyclomatic
severity: warning
disabled: false
arguments: [ 15 ]
disabled: true # Duplicate: gocyclo
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#file-header
- name: file-header
disabled: true
Expand All @@ -177,10 +151,6 @@ linters-settings:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-receiver
- name: unused-receiver
disabled: true
cyclop:
# The maximal code complexity to report.
# Default: 10
max-complexity: 15

issues:
# Excluding configuration per-path, per-linter, per-text and per-source
Expand All @@ -197,6 +167,16 @@ issues:
- maintidx
- revive

# Exclude linters for types file
- path: "types.go"
linters:
- funlen

# Exclude linters for methods file
- path: "methods.go"
linters:
- lll

# Which dirs to exclude: issues from them won't be reported.
# Can use regexp here: `generated.*`, regexp is applied on full path,
# including the path prefix if one is set.
Expand Down
Loading
Loading