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

WebrpcMethods(), var methods indentation #77

Merged
merged 3 commits into from
Nov 6, 2024
Merged

Conversation

david-littlefarmer
Copy link
Contributor

@david-littlefarmer david-littlefarmer commented Nov 5, 2024

Methods function:

func WebrpcMethods() map[string]method {
	res := make(map[string]method, len(methods))
	for k, v := range methods {
		res[k] = v
	}

	return res
}

Example of var methods fixed indentation
Before:

var (
	methods = map[string]method{
		"/rpc/ExampleService/Ping": {
			Name:        "Ping",
			Service:     "ExampleService",
			Annotations: map[string]string{"internal": ""},
		},
		"/rpc/ExampleService/Status": {
			Name:        "Status",
			Service:     "ExampleService",
			Annotations: map[string]string{"internal": ""},
		},
	}
)

After:

var methods = map[string]method{
	"/rpc/ExampleService/Ping": {
		Name:        "Ping",
		Service:     "ExampleService",
		Annotations: map[string]string{},
	},
	"/rpc/ExampleService/Status": {
		Name:        "Status",
		Service:     "ExampleService",
		Annotations: map[string]string{"internal": ""},
	},
}

@david-littlefarmer david-littlefarmer changed the title Methods(), var methods indentation WebrpcMethods(), var methods indentation Nov 6, 2024
Copy link
Contributor

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@david-littlefarmer david-littlefarmer merged commit 27970f3 into master Nov 6, 2024
1 check passed
@david-littlefarmer david-littlefarmer deleted the methods branch November 6, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants