Skip to content

Commit 2cd4287

Browse files
committed
fix lints
1 parent 1f0e170 commit 2cd4287

File tree

10 files changed

+27
-27
lines changed

10 files changed

+27
-27
lines changed

lib/client/rpc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ func (m *RPCClient) BlockNumber() (int64, error) {
234234
}
235235

236236
// GethSetHead sets the Ethereum node's head to a specified block in the past.
237-
// This function is useful for testing and debugging by allowing developers to
238-
// manipulate the blockchain state to a previous block. It returns an error
237+
// This function is useful for testing and debugging by allowing developers to
238+
// manipulate the blockchain state to a previous block. It returns an error
239239
// if the operation fails.
240240
func (m *RPCClient) GethSetHead(blocksBack int) error {
241241
decimalLastBlock, err := m.BlockNumber()

lib/docker/test_env/env_component.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type EnvComponent struct {
3434
type EnvComponentOption = func(c *EnvComponent)
3535

3636
// WithContainerName sets the container name for an EnvComponent.
37-
// It allows customization of the container's identity, enhancing clarity
37+
// It allows customization of the container's identity, enhancing clarity
3838
// and organization in containerized environments.
3939
func WithContainerName(name string) EnvComponentOption {
4040
return func(c *EnvComponent) {

lib/docker/test_env/ethereum_env.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (b *EthereumNetworkBuilder) WithConsensusLayer(consensusLayer config.Consen
8888
}
8989

9090
// WithExecutionLayer sets the execution layer for the Ethereum network builder.
91-
// It allows users to specify which execution layer to use, ensuring compatibility
91+
// It allows users to specify which execution layer to use, ensuring compatibility
9292
// with the selected Ethereum version and consensus layer.
9393
func (b *EthereumNetworkBuilder) WithExecutionLayer(executionLayer config_types.ExecutionLayer) *EthereumNetworkBuilder {
9494
b.executionLayer = executionLayer
@@ -103,7 +103,7 @@ func (b *EthereumNetworkBuilder) WithEthereumChainConfig(config config.EthereumC
103103
}
104104

105105
// WithDockerNetworks sets the Docker networks for the Ethereum network builder.
106-
// It allows users to specify custom networks for containerized deployments,
106+
// It allows users to specify custom networks for containerized deployments,
107107
// enhancing flexibility in network configuration.
108108
func (b *EthereumNetworkBuilder) WithDockerNetworks(networks []string) *EthereumNetworkBuilder {
109109
b.dockerNetworks = networks
@@ -119,15 +119,15 @@ func (b *EthereumNetworkBuilder) WithNodeLogLevel(nodeLogLevel string) *Ethereum
119119
}
120120

121121
// WithExistingConfig sets an existing Ethereum network configuration for the builder.
122-
// It allows users to customize the network setup using predefined settings,
122+
// It allows users to customize the network setup using predefined settings,
123123
// facilitating the creation of a network with specific parameters.
124124
func (b *EthereumNetworkBuilder) WithExistingConfig(config config.EthereumNetworkConfig) *EthereumNetworkBuilder {
125125
b.existingConfig = &config
126126
return b
127127
}
128128

129-
// WithExistingConfigFromEnvVar enables the use of an existing Ethereum configuration
130-
// sourced from an environment variable. This allows for flexible deployment
129+
// WithExistingConfigFromEnvVar enables the use of an existing Ethereum configuration
130+
// sourced from an environment variable. This allows for flexible deployment
131131
// configurations without hardcoding values, enhancing security and adaptability.
132132
func (b *EthereumNetworkBuilder) WithExistingConfigFromEnvVar() *EthereumNetworkBuilder {
133133
b.existingFromEnvVar = true
@@ -143,7 +143,7 @@ func (b *EthereumNetworkBuilder) WithTest(t *testing.T) *EthereumNetworkBuilder
143143
}
144144

145145
// WithCustomDockerImages sets custom Docker images for the Ethereum network builder.
146-
// This allows users to specify their own container images for different components,
146+
// This allows users to specify their own container images for different components,
147147
// enabling greater flexibility and customization in the network setup.
148148
func (b *EthereumNetworkBuilder) WithCustomDockerImages(newImages map[config.ContainerType]string) *EthereumNetworkBuilder {
149149
b.customDockerImages = newImages
@@ -787,7 +787,7 @@ func (en *EthereumNetwork) getImageOverride(ct config.ContainerType) string {
787787
}
788788

789789
// Save persists the configuration of the Ethereum network to a TOML file.
790-
// It generates a unique filename and logs the path for future reference in end-to-end tests.
790+
// It generates a unique filename and logs the path for future reference in end-to-end tests.
791791
// This function is essential for maintaining consistent test environments.
792792
func (en *EthereumNetwork) Save() error {
793793
name := fmt.Sprintf("ethereum_network_%s", uuid.NewString()[0:8])

lib/docker/test_env/job_distributor/jd.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func New(networks []string, opts ...Option) *Component {
151151
}
152152

153153
// WithTestInstance sets up a test logger and test context for a Component.
154-
// It is useful for initializing components in unit tests, ensuring that logs
154+
// It is useful for initializing components in unit tests, ensuring that logs
155155
// are captured and associated with the provided testing.T instance.
156156
func WithTestInstance(t *testing.T) Option {
157157
return func(j *Component) {
@@ -161,7 +161,7 @@ func WithTestInstance(t *testing.T) Option {
161161
}
162162

163163
// WithContainerPort sets the container port for a Component.
164-
// This option allows customization of the network configuration for the container,
164+
// This option allows customization of the network configuration for the container,
165165
// enabling proper communication with external services.
166166
func WithContainerPort(port string) Option {
167167
return func(j *Component) {
@@ -170,7 +170,7 @@ func WithContainerPort(port string) Option {
170170
}
171171

172172
// WithWSRPCContainerPort sets the WebSocket RPC port for the Component.
173-
// This option allows users to configure the port for WebSocket communication,
173+
// This option allows users to configure the port for WebSocket communication,
174174
// enabling flexibility in service deployment and integration.
175175
func WithWSRPCContainerPort(port string) Option {
176176
return func(j *Component) {

lib/docker/test_env/kafka.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ func (k *Kafka) StartContainer() error {
150150
}
151151

152152
// CreateLocalTopics creates Kafka topics based on the provided configurations.
153-
// It ensures that topics are only created if they do not already exist,
154-
// and logs the creation details for each topic. This function is useful
153+
// It ensures that topics are only created if they do not already exist,
154+
// and logs the creation details for each topic. This function is useful
155155
// for initializing Kafka environments with predefined topic settings.
156156
func (k *Kafka) CreateLocalTopics() error {
157157
for _, topicConfig := range k.TopicConfigs {

lib/docker/test_env/killgrave.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ type RequestData struct {
329329
}
330330

331331
// GetReceivedRequests retrieves and parses request data from a log file.
332-
// It ensures all requests are written before reading and returns a slice of
333-
// RequestData along with any encountered errors. This function is useful for
332+
// It ensures all requests are written before reading and returns a slice of
333+
// RequestData along with any encountered errors. This function is useful for
334334
// accessing logged request information in a structured format.
335335
func (k *Killgrave) GetReceivedRequests() ([]RequestData, error) {
336336
// killgrave uses a channel to write the request data to a file so we want to make sure

lib/docker/test_env/postgres.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func WithPostgresImageName(imageName string) PostgresDbOption {
6262
}
6363

6464
// WithPostgresImageVersion sets the PostgreSQL container image version for the database.
65-
// It allows customization of the database version used in the container, enhancing flexibility
65+
// It allows customization of the database version used in the container, enhancing flexibility
6666
// for development and testing environments.
6767
func WithPostgresImageVersion(version string) PostgresDbOption {
6868
return func(c *PostgresDb) {
@@ -91,7 +91,7 @@ func WithContainerEnv(key, value string) PostgresDbOption {
9191
}
9292

9393
// NewPostgresDb initializes a new Postgres database instance with specified networks and options.
94-
// It sets up the container environment and default configurations, returning the PostgresDb object
94+
// It sets up the container environment and default configurations, returning the PostgresDb object
9595
// for use in applications requiring a Postgres database connection.
9696
func NewPostgresDb(networks []string, opts ...PostgresDbOption) (*PostgresDb, error) {
9797
imageParts := strings.Split(defaultPostgresImage, ":")
@@ -137,13 +137,13 @@ func (pg *PostgresDb) WithTestInstance(t *testing.T) *PostgresDb {
137137
}
138138

139139
// StartContainer initializes and starts a PostgreSQL database container.
140-
// It ensures the container is ready for use, providing both internal and external connection URLs.
140+
// It ensures the container is ready for use, providing both internal and external connection URLs.
141141
// This function is essential for setting up a database environment in testing or development scenarios.
142142
func (pg *PostgresDb) StartContainer() error {
143143
return pg.startOrRestartContainer(false)
144144
}
145145

146-
// RestartContainer restarts the PostgreSQL database container, ensuring it is running with the latest configuration.
146+
// RestartContainer restarts the PostgreSQL database container, ensuring it is running with the latest configuration.
147147
// This function is useful for applying changes or recovering from issues without needing to manually stop and start the container.
148148
func (pg *PostgresDb) RestartContainer() error {
149149
return pg.startOrRestartContainer(true)

lib/docker/test_env/prysm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type PrysmBeaconChain struct {
4949
posContainerSettings
5050
}
5151

52-
// NewPrysmBeaconChain initializes a new Prysm beacon chain instance with the specified network configurations and parameters.
52+
// NewPrysmBeaconChain initializes a new Prysm beacon chain instance with the specified network configurations and parameters.
5353
// It is used to set up a beacon chain for Ethereum 2.0, enabling users to run and manage a consensus layer node.
5454
func NewPrysmBeaconChain(networks []string, chainConfig *config.EthereumChainConfig, generatedDataHostDir, generatedDataContainerDir, gethExecutionURL string, baseEthereumFork ethereum.Fork, opts ...EnvComponentOption) (*PrysmBeaconChain, error) {
5555
prysmBeaconChainImage, ok := beaconForkToImageMap[baseEthereumFork]

lib/docker/test_env/schema_registry.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func (r *SchemaRegistry) WithTestInstance(t *testing.T) *SchemaRegistry {
5454
}
5555

5656
// WithContainerName sets the container name for the SchemaRegistry instance.
57-
// This allows users to customize the naming of the container for better organization
57+
// This allows users to customize the naming of the container for better organization
5858
// and identification within their application. It returns the updated SchemaRegistry.
5959
func (r *SchemaRegistry) WithContainerName(name string) *SchemaRegistry {
6060
r.ContainerName = name
@@ -80,9 +80,9 @@ func (r *SchemaRegistry) WithEnvVars(envVars map[string]string) *SchemaRegistry
8080
}
8181

8282
// StartContainer initializes and starts a Schema Registry container.
83-
// It sets up the necessary environment variables and logs the internal
84-
// and external URLs for accessing the container. This function is
85-
// essential for users needing a running instance of Schema Registry
83+
// It sets up the necessary environment variables and logs the internal
84+
// and external URLs for accessing the container. This function is
85+
// essential for users needing a running instance of Schema Registry
8686
// for testing or development purposes.
8787
func (r *SchemaRegistry) StartContainer() error {
8888
r.InternalUrl = fmt.Sprintf("http://%s:%s", r.ContainerName, "8081")

lib/logging/log.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type CustomT struct {
3434
}
3535

3636
// Write writes the contents of p to the logger associated with CustomT.
37-
// It handles empty input gracefully and logs a warning if called after the test has ended.
37+
// It handles empty input gracefully and logs a warning if called after the test has ended.
3838
// Returns the number of bytes written and any write error encountered.
3939
func (ct *CustomT) Write(p []byte) (n int, err error) {
4040
str := string(p)

0 commit comments

Comments
 (0)