comparison pkg/imports/fa.go @ 5711:2dd155cc95ec revive-cleanup

Fix all revive issue (w/o machine generated stuff).
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 20 Feb 2024 22:22:57 +0100
parents f2204f91d286
children 6270951dda28
comparison
equal deleted inserted replaced
5710:37c8feeecb4d 5711:2dd155cc95ec
336 return *los 336 return *los
337 } 337 }
338 338
339 func doForFAs( 339 func doForFAs(
340 ctx context.Context, 340 ctx context.Context,
341 bnIds bottlenecks, 341 bnIDs bottlenecks,
342 fas []*ifaf.FairwayAvailability, 342 fas []*ifaf.FairwayAvailability,
343 tx *sql.Tx, 343 tx *sql.Tx,
344 feedback Feedback, 344 feedback Feedback,
345 ) ([]string, error) { 345 ) ([]string, error) {
346 346
369 var faID int64 369 var faID int64
370 feedback.Info("Found %d fairway availabilities", len(fas)) 370 feedback.Info("Found %d fairway availabilities", len(fas))
371 for _, faRes := range fas { 371 for _, faRes := range fas {
372 // FIXME: The following test is propably unneccessary as already 372 // FIXME: The following test is propably unneccessary as already
373 // done by DB constraints... [sw] 373 // done by DB constraints... [sw]
374 if !bnIds.contains(faRes.Bottleneck_id) { 374 if !bnIDs.contains(faRes.Bottleneck_id) {
375 feedback.Warn("Bottleneck %s not found in database.", faRes.Bottleneck_id) 375 feedback.Warn("Bottleneck %s not found in database.", faRes.Bottleneck_id)
376 continue 376 continue
377 } 377 }
378 err = insertFAStmt.QueryRowContext( 378 err = insertFAStmt.QueryRowContext(
379 ctx, 379 ctx,
477 } 477 }
478 478
479 // Do executes the actual fairway availability import. 479 // Do executes the actual fairway availability import.
480 func (fa *FairwayAvailability) Do( 480 func (fa *FairwayAvailability) Do(
481 ctx context.Context, 481 ctx context.Context,
482 importID int64, 482 _ int64,
483 conn *sql.Conn, 483 conn *sql.Conn,
484 feedback Feedback, 484 feedback Feedback,
485 ) (interface{}, error) { 485 ) (interface{}, error) {
486 486
487 fetch := func( 487 fetch := func(