Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Refactor how we generate Direction in the logs. So much nicer. #57

Merged
merged 1 commit into from
Dec 3, 2015

Conversation

darron
Copy link
Contributor

@darron darron commented Dec 3, 2015

The way I did it before, Direction was scoped to each command's Run function.

That was terrible and I ended up passing Direction around like a maniac trying to log everything properly.

To fix that and make it better I:

  1. Moved Direction to a Globally available var and made it available everywhere in the package.
  2. Removed it from each invocation of Log.
  3. Added it in the Log function itself - where it could be done once.

I was able to remove a ton of code - this seems much better.

darron added a commit that referenced this pull request Dec 3, 2015
Refactor how we generate Direction in the logs. So much nicer.
@darron darron merged commit f91f0eb into master Dec 3, 2015
@darron darron deleted the darron/refactor-direction branch December 3, 2015 17:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant