Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	go.mod
#	go.sum
  • Loading branch information
semyon-dev committed Feb 20, 2025
2 parents f37a623 + c4f25ce commit 15643cd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func SetVip(newVip *viper.Viper) {
vip = newVip
}

// ReadConfigFromJsonString function reads settigs from json string to the
// ReadConfigFromJsonString function reads settings from json string to the
// config instance. String should contain valid JSON config.
func ReadConfigFromJsonString(config *viper.Viper, json string) error {
config.SetConfigType("json")
Expand Down
2 changes: 1 addition & 1 deletion handler/stream_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func (interceptor *rateLimitInterceptor) intercept(srv any, ss grpc.ServerStream
return nil
}

// GrpcStreamInterceptor returns gRPC interceptor to validate payment. If
// GrpcPaymentValidationInterceptor returns gRPC interceptor to validate payment. If
// blockchain is disabled then noOpInterceptor is returned.
func GrpcPaymentValidationInterceptor(serviceData *blockchain.ServiceMetadata, defaultPaymentHandler StreamPaymentHandler, paymentHandler ...StreamPaymentHandler) grpc.StreamServerInterceptor {
interceptor := &paymentValidationInterceptor{
Expand Down
2 changes: 1 addition & 1 deletion logger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,5 @@ configuration is one JSON object located in ```log``` field.

### Adding new hooks implementations

Adding a new hook implementation is trivial. You should implement interface hook with method `call` which inputs `entry zapcore.Entry`. Also you need impelement init method which inputs configuration as [Viper](https://godoc.org/github.com/spf13/viper#Viper) config and returns new instance of the Hook structure. Then register the new hook
Adding a new hook implementation is trivial. You should implement interface hook with method `call` which inputs `entry zapcore.Entry`. Also you need implement init method which inputs configuration as [Viper](https://godoc.org/github.com/spf13/viper#Viper) config and returns new instance of the Hook structure. Then register the new hook
type by calling RegisterHookType() function from init() method. Please see "email" hook implementation as example in hook.go file.
6 changes: 3 additions & 3 deletions logger/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ func TestGetLocationTimezone(t *testing.T) {

testCases := []testGetLocationTimezone{
{
name: "Valid timzone",
name: "Valid timezone",
timezone: "UTC",
},
{
name: "Invalid timzone",
name: "Invalid timezone",
timezone: "INVALID",
expectedError: "unknown time zone INVALID",
},
Expand Down Expand Up @@ -326,7 +326,7 @@ func TestCreateWriterSyncer(t *testing.T) {

testCases := []createWriterSyncerTestCases{
{
name: "Valid signle output type",
name: "Valid single output type",
outputType: "file",
filePatternName: "./snet-daemon.%Y%m%d.log",
},
Expand Down

0 comments on commit 15643cd

Please sign in to comment.