<?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: Keson.An</title>
    <description>The latest articles on DEV Community by Keson.An (@keson).</description>
    <link>https://dev.to/keson</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%2F867778%2F8b835a70-cc30-46c2-858c-2ffad70a4d6c.jpeg</url>
      <title>DEV Community: Keson.An</title>
      <link>https://dev.to/keson</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/keson"/>
    <language>en</language>
    <item>
      <title>Which ORM do you use in Golang, gorm, xorm,sqlx, bun or sql, is there a recommended scaffold generation code?</title>
      <dc:creator>Keson.An</dc:creator>
      <pubDate>Sun, 21 Aug 2022 15:29:22 +0000</pubDate>
      <link>https://dev.to/keson/which-orm-do-you-use-in-golang-gorm-xormsqlx-bun-or-sql-is-there-a-recommended-scaffold-generation-code-51ei</link>
      <guid>https://dev.to/keson/which-orm-do-you-use-in-golang-gorm-xormsqlx-bun-or-sql-is-there-a-recommended-scaffold-generation-code-51ei</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/anqiansong/sqlgen"&gt;https://github.com/anqiansong/sqlgen&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the github, the golang orm with the top number of stars are gorm, xorm, sqlx, bun, etc. Although gorm provides a supporting scaffolding, but its difficulty is discouraging, xorm, sqlx, bun has not found a supporting scaffolding, we know that sqlc provides rich model generation functions, but its sql annotation rules are relatively rich, there are learning costs, but its rich functionality can cover most of the business queries, which is worth affirming, I refer to sqlc also wrote a sqlgen scaffolding, sql annotation rules are very simple, can also meet most of the scenarios, currently supports gorm, xorm, sqlx, bun and native sql code generation, which makes me use orm to greatly reduce the learning and development costs and improve the development efficiency. Share out welcome to build and learn together.&lt;/p&gt;

</description>
      <category>go</category>
      <category>generation</category>
      <category>mysql</category>
    </item>
    <item>
      <title>A Command-line tool to statistics the GitHub repositories</title>
      <dc:creator>Keson.An</dc:creator>
      <pubDate>Wed, 25 May 2022 14:49:30 +0000</pubDate>
      <link>https://dev.to/keson/a-command-line-tool-to-statistics-the-github-repositories-1f65</link>
      <guid>https://dev.to/keson/a-command-line-tool-to-statistics-the-github-repositories-1f65</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8FWfepcz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pyl3aoqqpqooiwgxlk0j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8FWfepcz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pyl3aoqqpqooiwgxlk0j.png" alt="banner" width="880" height="220"&gt;&lt;/a&gt;&lt;br&gt;
When we do research on frameworks, you'll probably start by Google the relevant keywords to get some results, followed by checking out the appropriate Topic from GitHub to choose the right framework. I believe that most people&lt;br&gt;
When choosing a framework, you don't just use it, you look at some of the repository's metrics to decide whether to choose it, or compare multiple frameworks.&lt;/p&gt;
&lt;h2&gt;
  
  
  Preface
&lt;/h2&gt;

&lt;p&gt;We know that there are already some web comparison tools in the community, such as &lt;code&gt;star-history&lt;/code&gt; for star trends, but there are no tools available on the endpoint for comparing GitHub repositories.&lt;br&gt;
When we look at a repository, we usually look at the following metrics to see if it is stable or not?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;star count (stars)&lt;/li&gt;
&lt;li&gt;frequency of updates (releases)&lt;/li&gt;
&lt;li&gt;community activity (contributors)&lt;/li&gt;
&lt;li&gt;issue resolution cycle (resolve issues)&lt;/li&gt;
&lt;li&gt;Length of repository creation (age)&lt;/li&gt;
&lt;li&gt;Organization (organization)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's choose Golang microservices framework as an example to compare some of the more popular frameworks in the current community&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;go-zero&lt;/li&gt;
&lt;li&gt;kratos&lt;/li&gt;
&lt;li&gt;go-micro&lt;/li&gt;
&lt;li&gt;kit&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before the tool, we may go to each repository in turn from the above indicators to their repository home page to see the relevant data, which will seem tedious, if you need to land into some comparative data, it is more necessary to manually go to&lt;br&gt;
If you need to make some comparison data, you need to write a table manually.&lt;/p&gt;

&lt;p&gt;Let's look at the results of &lt;a href="https://github.com/anqiansong/github-compare"&gt;github-compare&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────┬─────────────────────┬───────────────────────┬──────────────────────┬──────────────────┐
│ METRICS                 │ ZEROMICRO/GO-ZERO   │ GO-KRATOS/KRATOS      │ ASIM/GO-MICRO        │ GO-KIT/KIT       │
├─────────────────────────┼─────────────────────┼───────────────────────┼──────────────────────┼──────────────────┤
│ 🏠 homepage             │ https://go-zero.dev │ https://go-kratos.dev │ https://go-micro.dev │ https://gokit.io │
│ 🌎 language             │ Go                  │ Go                    │ Go                   │ Go               │
│ 📌 license              │ MIT License         │ MIT License           │ Apache License 2.0   │ MIT License      │
│ ⏰ age                  │ 655 days            │ 1231 days             │ 2688 days            │ 2668 days        │
│ 🌟 stars                │ 17778(27/d)         │ 17856(14/d)           │ 18233(6/d)           │ 23084(8/d)       │
│ 📊 latestDayStarCount   │ 33 (up)             │ 7 (down)              │ 2 (down)             │ 10 (up)          │
│ 📉 latestWeekStarCount  │ 227 (up)            │ 64 (down)             │ 31 (down)            │ 44 (down)        │
│ 📈 latestMonthStarCount │ 916                 │ 531                   │ 176                  │ 235              │
│ 👏 forks                │ 2520(3/d)           │ 3446(2/d)             │ 2087(0/d)            │ 2315(0/d)        │
│ 👀 watchers             │ 266                 │ 424                   │ 510                  │ 690              │
│ 💪 issues               │ 50/741              │ 51/793                │ 76/914               │ 35/548           │
│ 💯 pull requests        │ 13/1155             │ 10/1221               │ 0/1513               │ 9/627            │
│ 👥 contributors         │ 132                 │ 198                   │ 166                  │ 221              │
│ 🚀 releases             │ 63                  │ 49                    │ 206                  │ 12               │
│ 🔭 release circle(avg)  │ 10 days             │ 25 days               │ 13 days              │ 222 days         │
│ 🎯 lastRelease          │ 24 day(s) ago       │ 1 day(s) ago          │ 5 day(s) ago         │ 8 month(s) ago   │
│ 🕦 lastCommit           │ 2 day(s) ago        │ 2 hour(s) ago         │ 5 day(s) ago         │ 6 day(s) ago     │
│ 📝 lastUpdate           │ 47 minute(s) ago    │ 16 minute(s) ago      │ 1 hour(s) ago        │ 1 hour(s) ago    │
└─────────────────────────┴─────────────────────┴───────────────────────┴──────────────────────┴──────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can clearly see the metrics of the GitHub repository in this graph, so let's take a look at how the tool works.&lt;/p&gt;

&lt;h2&gt;
  
  
  github-compare
&lt;/h2&gt;

&lt;p&gt;A Command-line tool to statistics the GitHub repositories&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;go &lt;span class="nb"&gt;install &lt;/span&gt;github.com/anqiansong/github-compare@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;github-compare zeromicro/go-zero go-kratos/kratos asim/go-micro go-kit/kit
┌─────────────────────────┬─────────────────────┬───────────────────────┬──────────────────────┬──────────────────┐
│ METRICS                 │ ZEROMICRO/GO-ZERO   │ GO-KRATOS/KRATOS      │ ASIM/GO-MICRO        │ GO-KIT/KIT       │
├─────────────────────────┼─────────────────────┼───────────────────────┼──────────────────────┼──────────────────┤
│ 🏠 homepage             │ https://go-zero.dev │ https://go-kratos.dev │ https://go-micro.dev │ https://gokit.io │
│ 🌎 language             │ Go                  │ Go                    │ Go                   │ Go               │
│ 📌 license              │ MIT License         │ MIT License           │ Apache License 2.0   │ MIT License      │
│ ⏰ age                  │ 655 days            │ 1231 days             │ 2688 days            │ 2668 days        │
│ 🌟 stars                │ 17778&lt;span class="o"&gt;(&lt;/span&gt;27/d&lt;span class="o"&gt;)&lt;/span&gt;         │ 17856&lt;span class="o"&gt;(&lt;/span&gt;14/d&lt;span class="o"&gt;)&lt;/span&gt;           │ 18233&lt;span class="o"&gt;(&lt;/span&gt;6/d&lt;span class="o"&gt;)&lt;/span&gt;           │ 23084&lt;span class="o"&gt;(&lt;/span&gt;8/d&lt;span class="o"&gt;)&lt;/span&gt;       │
│ 📊 latestDayStarCount   │ 33 &lt;span class="o"&gt;(&lt;/span&gt;up&lt;span class="o"&gt;)&lt;/span&gt;             │ 7 &lt;span class="o"&gt;(&lt;/span&gt;down&lt;span class="o"&gt;)&lt;/span&gt;              │ 2 &lt;span class="o"&gt;(&lt;/span&gt;down&lt;span class="o"&gt;)&lt;/span&gt;             │ 10 &lt;span class="o"&gt;(&lt;/span&gt;up&lt;span class="o"&gt;)&lt;/span&gt;          │
│ 📉 latestWeekStarCount  │ 227 &lt;span class="o"&gt;(&lt;/span&gt;up&lt;span class="o"&gt;)&lt;/span&gt;            │ 64 &lt;span class="o"&gt;(&lt;/span&gt;down&lt;span class="o"&gt;)&lt;/span&gt;             │ 31 &lt;span class="o"&gt;(&lt;/span&gt;down&lt;span class="o"&gt;)&lt;/span&gt;            │ 44 &lt;span class="o"&gt;(&lt;/span&gt;down&lt;span class="o"&gt;)&lt;/span&gt;        │
│ 📈 latestMonthStarCount │ 916                 │ 531                   │ 176                  │ 235              │
│ 👏 forks                │ 2520&lt;span class="o"&gt;(&lt;/span&gt;3/d&lt;span class="o"&gt;)&lt;/span&gt;           │ 3446&lt;span class="o"&gt;(&lt;/span&gt;2/d&lt;span class="o"&gt;)&lt;/span&gt;             │ 2087&lt;span class="o"&gt;(&lt;/span&gt;0/d&lt;span class="o"&gt;)&lt;/span&gt;            │ 2315&lt;span class="o"&gt;(&lt;/span&gt;0/d&lt;span class="o"&gt;)&lt;/span&gt;        │
│ 👀 watchers             │ 266                 │ 424                   │ 510                  │ 690              │
│ 💪 issues               │ 50/741              │ 51/793                │ 76/914               │ 35/548           │
│ 💯 pull requests        │ 13/1155             │ 10/1221               │ 0/1513               │ 9/627            │
│ 👥 contributors         │ 132                 │ 198                   │ 166                  │ 221              │
│ 🚀 releases             │ 63                  │ 49                    │ 206                  │ 12               │
│ 🔭 release circle&lt;span class="o"&gt;(&lt;/span&gt;avg&lt;span class="o"&gt;)&lt;/span&gt;  │ 10 days             │ 25 days               │ 13 days              │ 222 days         │
│ 🎯 lastRelease          │ 24 day&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; ago       │ 1 day&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; ago          │ 5 day&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; ago         │ 8 month&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; ago   │
│ 🕦 lastCommit           │ 2 day&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; ago        │ 2 hour&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; ago         │ 5 day&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; ago         │ 6 day&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; ago     │
│ 📝 lastUpdate           │ 47 minute&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; ago    │ 16 minute&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; ago      │ 1 hour&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; ago        │ 1 hour&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; ago    │
└─────────────────────────┴─────────────────────┴───────────────────────┴──────────────────────┴──────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Preparation
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token"&gt;Creating a personal access token&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Set access token token

&lt;ul&gt;
&lt;li&gt;Copied the access token and export to environment&lt;/li&gt;
&lt;li&gt;Or you can set the access token by passing &lt;code&gt;github-compare&lt;/code&gt; argument &lt;code&gt;--token&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Execute
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# set access token through the flag --token&lt;/span&gt;
&lt;span class="c"&gt;# zeromicro/go-zero go-kratos/kratos asim/go-micro go-kit/kit --token ${accessToken}&lt;/span&gt;
&lt;span class="c"&gt;# or export access token to environment (recommended)&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GITHUB_ACCESS_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;GITHUB_ACCESS_TOKEN&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;zeromicro/go-zero go-kratos/kratos asim/go-micro go-kit/kit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Note
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;A GitHub personal access token is required.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;github-compare&lt;/code&gt; accepts 1 to 4 repositories data queries.&lt;/li&gt;
&lt;li&gt;If you prefer to export the access token to environment, you must use
environment key &lt;code&gt;GITHUB_ACCESS_TOKEN&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Last
&lt;/h2&gt;

&lt;p&gt;If this repository can help you, give a &lt;a href="https://github.com/anqiansong/github-compare"&gt;star&lt;/a&gt; please!&lt;/p&gt;

&lt;p&gt;Thanks all!&lt;/p&gt;

</description>
      <category>go</category>
      <category>github</category>
      <category>compare</category>
      <category>cli</category>
    </item>
  </channel>
</rss>
