<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Derek Smith</title>
    <description>The latest articles on DEV Community by Derek Smith (@clok).</description>
    <link>https://dev.to/clok</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F630100%2Fa3a5392a-214d-41fb-a79f-288ba32678a1.jpeg</url>
      <title>DEV Community: Derek Smith</title>
      <link>https://dev.to/clok</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/clok"/>
    <language>en</language>
    <item>
      <title>NPM debug style logging in Go</title>
      <dc:creator>Derek Smith</dc:creator>
      <pubDate>Wed, 12 May 2021 14:28:59 +0000</pubDate>
      <link>https://dev.to/clok/npm-debug-style-logging-in-go-4e1l</link>
      <guid>https://dev.to/clok/npm-debug-style-logging-in-go-4e1l</guid>
      <description>&lt;p&gt;I have always appreciated the &lt;a href="https://github.com/visionmedia/debug"&gt;debug&lt;/a&gt; logging pattern commonly used within NodeJS projects. As I worked more with go, I wanted to bring that logging pattern to the language.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/clok/kemba"&gt;kemba&lt;/a&gt; is a simple logging library that is a reimplementation of the npm &lt;a href="https://github.com/visionmedia/debug"&gt;debug&lt;/a&gt; module in hopes of bringing that capability to the language.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;kemba&lt;/code&gt; logger reads the &lt;code&gt;DEBUG&lt;/code&gt; and &lt;code&gt;KEMBA&lt;/code&gt; environment variables to determine if a log line should be output. The logger outputs to &lt;code&gt;STDERR&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When it is not set, the logger will immediately return, taking no action.&lt;/p&gt;

&lt;p&gt;When the value is set (ex. &lt;code&gt;DEBUG=example:*,tool:details&lt;/code&gt; and/or &lt;code&gt;KEMBA=plugin:fxn:start&lt;/code&gt;), the logger will determine if it should be &lt;code&gt;enabled&lt;/code&gt; when instantiated.&lt;/p&gt;

&lt;p&gt;The value of these flags can be a simple regex alternative where a wildcard (&lt;code&gt;*&lt;/code&gt;) are replaced with &lt;code&gt;.*&lt;/code&gt; and all terms are prepended with &lt;code&gt;^&lt;/code&gt; and appended with &lt;code&gt;$&lt;/code&gt;. If a term does not include a wildcard, then an exact match it required.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/avelino/awesome-go"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XlDje2PB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://awesome.re/mentioned-badge-flat.svg" alt="Mentioned in Awesome&amp;lt;br&amp;gt;
Go"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>debug</category>
      <category>npm</category>
      <category>logging</category>
    </item>
    <item>
      <title>Sync GitHub Labels across repos</title>
      <dc:creator>Derek Smith</dc:creator>
      <pubDate>Wed, 12 May 2021 14:20:08 +0000</pubDate>
      <link>https://dev.to/clok/sync-github-labels-across-repos-4p2</link>
      <guid>https://dev.to/clok/sync-github-labels-across-repos-4p2</guid>
      <description>&lt;p&gt;Work across many of Repos? Manage an Org with hundreds of Repos? Ever wanted to have consistent Labels for Issues and PRs? This tool has you covered. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/clok/ghlabels"&gt;ghlabels&lt;/a&gt; is a simple CLI tool to help manage Labels across Repos. It has built in defaults that can be added to or overwritten via custom configuration.&lt;/p&gt;

&lt;p&gt;This tool has proved valuable in synchronizing Labels across 300+ repos within the &lt;a href="https://github.com/GoodwayGroup"&gt;GoodwayGroup&lt;/a&gt; resulting in a more efficient SDLC and consistent communication across all PRs.&lt;/p&gt;

</description>
      <category>github</category>
      <category>devops</category>
      <category>go</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
