Skip to content

Commit 50f48b8

Browse files
Tofelgithub-actions[bot]
authored andcommitted
[Bot] Add automatically generated go documentation
1 parent d66b740 commit 50f48b8

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

framework/components/jd/jd.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ func defaultJDDB() *postgres.Input {
6060
}
6161
}
6262

63+
// NewJD initializes a new job descriptor container based on the provided input.
64+
// It configures the container with necessary environment variables and networking settings,
65+
// returning an output structure containing connection URLs or an error if the process fails.
6366
func NewJD(in *Input) (*Output, error) {
6467
if in.Out != nil && in.Out.UseCache {
6568
return in.Out, nil

framework/components/postgres/postgres.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ type Output struct {
4141
JDDockerInternalURL string `toml:"jd_docker_internal_url"`
4242
}
4343

44+
// NewPostgreSQL initializes a PostgreSQL container with specified databases and configurations.
45+
// It returns connection details for the created database, enabling users to interact with the database in their applications.
4446
func NewPostgreSQL(in *Input) (*Output, error) {
4547
ctx := context.Background()
4648

framework/components/simple_node_set/fund.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import (
1515
"math/big"
1616
)
1717

18+
// SendETH transfers a specified amount of ETH from a given private key to a target address.
19+
// It handles transaction creation, signing, and sending, ensuring proper nonce and gas management.
1820
func SendETH(client *ethclient.Client, privateKeyHex string, toAddress string, amount *big.Float) error {
1921
privateKey, err := crypto.HexToECDSA(privateKeyHex)
2022
if err != nil {

tools/flakeguard/reports/io.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ func (OSFileSystem) WriteFile(filename string, data []byte, perm os.FileMode) er
3232
return os.WriteFile(filename, data, perm)
3333
}
3434

35+
// LoadAndAggregate processes JSON test result files from the specified directory,
36+
// aggregating their contents into a single TestReport. It returns the aggregated report
37+
// or an error if file processing or aggregation fails. This function is useful for
38+
// consolidating test results in a structured format.
3539
func LoadAndAggregate(resultsPath string) (*TestReport, error) {
3640
reportChan := make(chan *TestReport)
3741
errChan := make(chan error, 1)
@@ -213,6 +217,9 @@ func SaveSummaryAsJSON(fs FileSystem, path string, summary SummaryData) error {
213217
return nil
214218
}
215219

220+
// SaveReportNoLogs saves a TestReport to a specified file path without logging output details.
221+
// It filters out output data from test results before serialization, ensuring only essential information is stored.
222+
// This function is useful for preserving test results in a clean format for later analysis.
216223
func SaveReportNoLogs(fs FileSystem, filePath string, report TestReport) error {
217224
var filteredResults []TestResult
218225
for _, r := range report.Results {

0 commit comments

Comments
 (0)