wakatime/wakatime-cli

Changes for code readability

alanhamlett opened this issue · 1 comments

  1. Let's rename this function because it's easily confused with Sender.SendHeartbeats, and vscode can't find implementations of Sender.SendHeartbeats because it's an interface. That means you have to search for SendHeartbeats, and the unrelated one shows up in the results.

  2. How about removing NewClient and only use NewClientWithoutAuth then set the key on the request for fetching Goal and Today?

  1. vscode or other IDEs like Goland will properly find this implementation as you can see in the screenshoot below. IMO it's well written and describes exactly what the func is proposed to do. Any thoughts?
    Screen Shot 2022-05-04 at 17 47 39
  2. I wouldn't remove NewClient just because SendHeartbeat doesn't need it. I'd keep it since Options pattern can benefit us for extensibility purposes. If new features come and authentication is needed NewClient will be ready for it.