Replace prazdnikisegodnyaru with celebratoday, small underhood fixes

- Replace prazdnikisegodnyaru with celebratoday as first is banned in Russia
- Update .golangci.yml rule set
- Megatons of fixes for linter
- Update README.md
This commit is contained in:
eleksir
2026-02-10 20:05:13 +03:00
parent ff57b0af7d
commit f2fc168abe
28 changed files with 1298 additions and 268 deletions

View File

@@ -1,3 +1,4 @@
// Implements aleesa-web-go application.
package main
import (

View File

@@ -0,0 +1,44 @@
// Package main implements celebratoday api test.
package main
import (
"fmt"
"os"
"aleesa-webapp-go/internal/celebratoday"
"aleesa-webapp-go/internal/log"
"aleesa-webapp-go/internal/webapp"
)
func main() {
var (
logfile *os.File
)
err := webapp.ReadConfig()
if err != nil {
log.Errorf("Unable to parse config: %s", err)
os.Exit(1)
}
// Откроем лог и скормим его логгеру.
if webapp.Config.Log != "" {
logfile, err = os.OpenFile(webapp.Config.Log, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644)
if err != nil {
log.Errorf("Unable to open log file %s: %s", webapp.Config.Log, err)
os.Exit(1)
}
}
log.Init(webapp.Config.Loglevel, logfile)
str, err := celebratoday.APIClient(webapp.Config)
if err != nil {
fmt.Printf("Error: %s\n", err)
}
fmt.Println(str)
}

View File

@@ -1,3 +1,4 @@
// Implements initialisation app for flickr service. Gains Tokens, etc.
package main
import (

View File

@@ -1,3 +1,4 @@
// Package main get flickr oauth keys required for proper client work an stores it locally.
package main
import (

View File

@@ -1,3 +1,4 @@
// Package main ensures that oauth keys downloaded correctly and client part is working.
package main
import (