apache / apache/eventmesh

[Enhancement] Do some code optimization.[writer_factory.go]

Open
#3,770 1 comment 0 reactions 0 assignees View on GitHub
enhancement good first issue Stale
Dominant language
Java
Stars
1.8k
Forks
658
Avg merge
11h 29m
Merged PRs (30d)
52

Description

### Search before asking

- [X] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues.

### Enhancement Request

This issue is a subproject issue of eventmesh. the subproject address is:
https://github.com/apache/eventmesh-go
![image](https://user-images.githubusercontent.com/91315508/233282881-fdef2fab-652f-4d7e-a162-4ba2b9a46533.png)
located at:
eventmesh-go/log/writer_factory.go line 49,80,88
analysis and expalanation:
a.Unused parameter 'name'
b.if-return: redundant if ...; err != nil check, just return error instead.

### Describe the solution you'd like

![image](https://user-images.githubusercontent.com/91315508/233283003-39741395-a36e-4987-a6c2-3693a54555af.png)

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Open eventmesh-go/log/writer_factory.go and inspect lines 49, 80, and 88. Verify the unused `name` parameter and redundant if-return error checks described in the issue; done means those reported issues are resolved and the eventmesh-go checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.