Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some comments #607

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/interceptors.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,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 PaymentHandler, paymentHandler ...PaymentHandler) 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