Closed mrbardia72 closed 4 months ago
Not sure it really matters, I prefer things in the log be lowercase but I'm not always good with keeping that rule. Using the name of the function is easy and I think helps. In the end, you need a pattern the entire team can follow without too much trouble.
Proposal: It is not better to write the names in one of the following ways for better readability
Like in the link below: https://github.com/ardanlabs/service/blob/master/business/domain/homebus/stores/homedb/homedb.go#L59
Line 59, which is as follows.
return fmt.Errorf("namedexeccontext: %w", err)
Convert to a format like the following examples return fmt.Errorf("named.exec.context: %w", err) return fmt.Errorf("named-exec-context: %w", err) return fmt.Errorf("named_exec_context: %w", err)