-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Adds staticcheck lint check (#37)
* chore: Adds staticcheck lint check * Moves random number generation to its own func
- Loading branch information
Showing
5 changed files
with
49 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Copyright 2024 Canonical Ltd. | ||
|
||
package producer_test | ||
|
||
import ( | ||
"fmt" | ||
"testing" | ||
|
||
"github.com/omec-project/ausf/producer" | ||
) | ||
|
||
func TestGenerateRandomNumber(t *testing.T) { | ||
value, err := producer.GenerateRandomNumber() | ||
|
||
if err != nil { | ||
t.Fatalf("GenerateRandomNumber() failed: %s", err) | ||
} | ||
|
||
fmt.Printf("Random number: %d\n", value) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters