title: Combine common prefix substrings
body: <p>I have a stream of messages entering a Go channel, most of which look like:</p>
  
  <p><code>T: added package to graph: acl-devel/2.2.52_4/armv6l-musl
  T: added package to graph: rofs-filtered/1.7_1/x86_64-musl
  T: added package to graph: rofs-filtered/1.7_1/HOST
  T: added package to graph: libshout/2.4.1_1/i686
  T: added package to graph: mate-terminal/1.18.1_1/armv6l
  T: added package to graph: bullet-devel/2.86.1_1/x86_64-musl
  T: added package to graph: bullet-devel/2.86.1_1/HOST
  T: added package to graph: cubietruck-uboot/2016.11_1/armv6l-musl
  T: added package to graph: libfontenc/1.1.3_1/i686-musl
  T: added package to graph: apk-tools/2.8.1_1/x86_64
  T: added package to graph: virtualbox-ose/5.1.28_1/armv7l-musl
  T: added package to graph: acl-devel/2.2.52_4/armv7l
  T: added package to graph: apk-tools/2.8.1_1/x86_64-musl
  T: added package to graph: tzutils/2017c_1/x86_64-musl
  T: added package to graph: python-argh/0.26.2_1/noarch
  T: added package to graph: tzutils/2017c_1/HOST
  </code></p>
  
  <p>I wish to be able to efficiently combine the above strings, line by line, but lose no information. This is for printing to an IRC channel, so I don't want to trigger flood warnings. To do that, I want to massage the above to be similar to the below:</p>
  
  <p><code>T: added package to graph: rofs-filtered/1.7_1/{x86_64-musl,HOST}
  T: added package to graph: libshout/2.4.1_1/i686
  T: added package to graph: mate-terminal/1.18.1_1/armv6l
  T: added package to graph: bullet-devel/2.86.1_1/{x86_64-musl,HOST}
  T: added package to graph: cubietruck-uboot/2016.11_1/armv6l-musl
  T: added package to graph: libfontenc/1.1.3_1/i686-musl
  T: added package to graph: apk-tools/2.8.1_1/{x86_64,x86_64-musl}
  T: added package to graph: virtualbox-ose/5.1.28_1/armv7l-musl
  T: added package to graph: acl-devel/2.2.52_4/{armv6l-musl,armv7l}
  T: added package to graph: tzutils/2017c_1/{x86_64-musl,HOST}
  T: added package to graph: python-argh/0.26.2_1/noarch
  </code></p>
  
  <p>While still a lot of output and messages, the bulk of the reporting is about 10-12 lines with common prefixes as above, interspersed with the output of multiple threads doing the above (hence the low number of duplicates in the above data, lots of threads and the data is a snapshot of about 2 seconds).</p>
  
  <p>How might I condense multiple lines to join along their common prefix in Go?</p>