0

In a single github repository containing multiple binaries code together. How can we find the total lines of codes per binary? Also, need to see the lines of codes per binary over a period of time.

For example in the below repository structure

cmd/service1
cmd/service2
pkg/service1
pkg/service2

Need to find the lines of code per service above?

Do we have any tools available to find this?

Alok Kumar Singh
  • 2,331
  • 3
  • 18
  • 37
  • 1
    not sure exactly what you are asking but this might be helpful https://blog.golang.org/profiling-go-programs – Vorsprung Apr 22 '19 at 09:32
  • https://github.com/google/godepq/issues/30 – Alok Kumar Singh Apr 22 '19 at 11:12
  • What are you using this data for? A binary includes the runtime and all code referenced by your code, including stdlib and third-party packages. Is that what you're wanting to measure? – Adrian Apr 22 '19 at 12:59
  • Yes mostly the vendored code and also the other dependencies the binary has. To figure out after which release the lines of code has increased by a big difference. And also to figure out which binary to be worked on first to split the repo from a single repo to a multi repo. Making changes here https://github.com/google/godepq/issues/30 to add a feature `--show-loc` – Alok Kumar Singh Apr 22 '19 at 13:04

0 Answers0