chore: go fmt

This commit is contained in:
xuu
2025-03-26 15:38:25 -06:00
parent b34c9bc99f
commit fe28b7c2ad
5 changed files with 40 additions and 37 deletions

19
feed.go
View File

@@ -32,7 +32,7 @@ type Feed struct {
LastScanOn TwtTime
RefreshRate int
NextScanOn TwtTime
LastTwtOn TwtTime
LastTwtOn TwtTime
LastModified TwtTime
LastError sql.NullString
@@ -321,7 +321,7 @@ func storeFeed(ctx context.Context, db db, f types.TwtFile) error {
if prev, ok := f.Info().GetN("prev", 0); ok {
_, part, ok := strings.Cut(prev.Value(), " ")
if ok {
uri:= f.Twter().URI
uri := f.Twter().URI
if u, ok := f.Info().GetN("url", 0); ok {
uri = u.Value()
}
@@ -333,13 +333,13 @@ func storeFeed(ctx context.Context, db db, f types.TwtFile) error {
childID := urlNS.UUID5(part)
fmt.Println("found prev", uri, part)
args = append(args,
childID, // feed_id
feedID, // parent_id
childID, // feed_id
feedID, // parent_id
f.Twter().DomainNick(), // nick
part, // uri
"once", // state
nil, // last_scan_on
0, // refresh_rate
part, // uri
"once", // state
nil, // last_scan_on
0, // refresh_rate
)
}
}
@@ -373,6 +373,9 @@ func (feed *Feed) MakeHTTPRequest(ctx context.Context) (*http.Request, error) {
if strings.Contains(feed.URI, "lublin.se") {
return nil, fmt.Errorf("%w: permaban: %s", ErrPermanentlyDead, feed.URI)
}
if strings.Contains(feed.URI, "enotty.dk") {
return nil, fmt.Errorf("%w: permaban: %s", ErrPermanentlyDead, feed.URI)
}
req, err := http.NewRequestWithContext(ctx, "GET", feed.URI, nil)
if err != nil {