switched codeql to go

This commit is contained in:
Dmitrii Andreev
2025-04-07 19:17:04 +03:00
parent 926a9ca08b
commit b4bed37a9f
2 changed files with 6 additions and 6 deletions

View File

@@ -35,7 +35,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
language: [ 'python' ] language: [ 'go' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both

View File

@@ -83,12 +83,12 @@ func (g *Generator) GenerateFeed(maxItems int) ([]byte, error) {
} }
item := &feeds.Item{ item := &feeds.Item{
Title: fmt.Sprintf("Recording %s", rec.RecordedAt.Format("2006-01-02 15:04")), Title: fmt.Sprintf("Recording %s", rec.RecordedAt.Format("2006-01-02 15:04")),
Link: &feeds.Link{Href: fileURL}, Link: &feeds.Link{Href: fileURL},
Description: fmt.Sprintf("Icecast stream recording from %s. Duration: %s", Description: fmt.Sprintf("Icecast stream recording from %s. Duration: %s",
rec.RecordedAt.Format(time.RFC1123), rec.Duration.String()), rec.RecordedAt.Format(time.RFC1123), rec.Duration.String()),
Created: rec.RecordedAt, Created: rec.RecordedAt,
Id: rec.Hash, Id: rec.Hash,
Enclosure: &feeds.Enclosure{ Enclosure: &feeds.Enclosure{
Url: fileURL, Url: fileURL,
Length: fmt.Sprintf("%d", rec.FileSize), Length: fmt.Sprintf("%d", rec.FileSize),
@@ -149,7 +149,7 @@ func (g *Generator) scanRecordings(maxItems int) ([]RecordingInfo, error) {
// Calculate an estimated duration based on file size // Calculate an estimated duration based on file size
// Assuming ~128kbps MP3 bitrate: 16KB per second // Assuming ~128kbps MP3 bitrate: 16KB per second
estimatedDuration := time.Duration(info.Size() / 16000) * time.Second estimatedDuration := time.Duration(info.Size()/16000) * time.Second
// Generate a stable hash for the recording // Generate a stable hash for the recording
filename := filepath.Base(path) filename := filepath.Base(path)