<?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: masaushi</title>
    <description>The latest articles on DEV Community by masaushi (@masaushi).</description>
    <link>https://dev.to/masaushi</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%2F721734%2Fa3d87b4f-d3ff-408f-8aaf-c48b2dd0cc2f.png</url>
      <title>DEV Community: masaushi</title>
      <link>https://dev.to/masaushi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/masaushi"/>
    <language>en</language>
    <item>
      <title>The Ultimate TUI Tool for AWS ECS Operations</title>
      <dc:creator>masaushi</dc:creator>
      <pubDate>Mon, 14 Aug 2023 03:25:09 +0000</pubDate>
      <link>https://dev.to/masaushi/cli-tool-for-aws-ecs-14ig</link>
      <guid>https://dev.to/masaushi/cli-tool-for-aws-ecs-14ig</guid>
      <description>&lt;p&gt;Hi all,&lt;br&gt;
I have made a tool for easy CLI operations with AWS ECS, so let me introduce it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/masaushi/ecsplorer"&gt;https://github.com/masaushi/ecsplorer&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/masaushi"&gt;
        masaushi
      &lt;/a&gt; / &lt;a href="https://github.com/masaushi/ecsplorer"&gt;
        ecsplorer
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      ecsplorer is a tool designed for easy CLI operations with AWS ECS.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
ecsplorer&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://github.com/masaushi/ecsplorer/actions/workflows/release.yml"&gt;&lt;img src="https://github.com/masaushi/ecsplorer/actions/workflows/release.yml/badge.svg" alt="release"&gt;&lt;/a&gt;
&lt;a href="https://github.com/masaushi/ecsplorer/actions/workflows/lint.yml"&gt;&lt;img src="https://github.com/masaushi/ecsplorer/actions/workflows/lint.yml/badge.svg" alt="lint"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;ecsplorer is a tool designed for easy CLI operations with AWS ECS.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/masaushi/ecsplorer./ecsplorer.gif"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jOcFpwjJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://github.com/masaushi/ecsplorer./ecsplorer.gif" alt="ecsplorer"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
Overview&lt;/h2&gt;
&lt;p&gt;This tool serves as a CLI utility to efficiently manage AWS ECS resources and services. It provides support for ECS operations through simple commands.&lt;/p&gt;
&lt;h2&gt;
Key Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Retrieve lists of ECS resources&lt;/li&gt;
&lt;li&gt;Exec into containers&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Installation&lt;/h2&gt;
&lt;h3&gt;
Download binary&lt;/h3&gt;
&lt;p&gt;Binaries for Windows, MacOS and Linux are available in the &lt;a href="https://github.com/masaushi/ecsplorer/releases"&gt;release&lt;/a&gt; page.&lt;/p&gt;
&lt;h3&gt;
via Homebrew for macOS or Linux&lt;/h3&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;brew install masaushi/tap/ecsplorer&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
via Go install&lt;/h3&gt;
&lt;h4&gt;
Go version &amp;lt; 1.16&lt;/h4&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;go get github.com/masaushi/ecsplorer&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
Go 1.16+&lt;/h4&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;go install github.com/masaushi/ecsplorer@latest&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
Usage&lt;/h3&gt;
&lt;p&gt;After installation, you can launch a terminal UI by executing the &lt;code&gt;ecsplorer&lt;/code&gt; command.&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;ecsplorer&lt;/pre&gt;

&lt;/div&gt;
&lt;h4&gt;
specify profile&lt;/h4&gt;
&lt;p&gt;You can specify a profile from your &lt;code&gt;.aws/config&lt;/code&gt; by using the &lt;code&gt;--profile=&amp;lt;profile name&amp;gt;&lt;/code&gt; option or setting the AWS_PROFILE= environment variable.&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;ecsplorer --profile=&lt;span class="pl-k"&gt;&amp;lt;&lt;/span&gt;profile&lt;span class="pl-k"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;AWS_PROFILE=&lt;span class="pl-k"&gt;&amp;lt;&lt;/span&gt;profile&lt;span class="pl-k"&gt;&amp;gt;&lt;/span&gt; ecsplorer&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
⚠️ Note ⚠️
&lt;/h3&gt;
&lt;p&gt;If you intend to exec into containers, please ensure that the &lt;a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html" rel="nofollow"&gt;session-manager-plugin&lt;/a&gt;…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/masaushi/ecsplorer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Here is a demo of ecsplorer.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LLEp9Rf5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w6oky7fxpboh7bui3nfc.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LLEp9Rf5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w6oky7fxpboh7bui3nfc.gif" alt="demo of ecsplorer" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What's this
&lt;/h3&gt;

&lt;p&gt;In the vast world of AWS, managing ECS resources can sometimes be a daunting task. Enter &lt;code&gt;ecsplorer&lt;/code&gt;, a tool specifically designed to simplify CLI operations with AWS ECS. This utility aims to streamline the process of managing AWS ECS resources and services.&lt;/p&gt;

&lt;p&gt;This tool allows you to easily view AWS ECS resources through your terminal.  With it, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;View ECS resources such as clusters, services, tasks, etc.&lt;/li&gt;
&lt;li&gt;Exec into containers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You no longer need to log into the AWS Console for ECS operations or to retrieve resource information for ECS Exec.&lt;/p&gt;

&lt;h3&gt;
  
  
  Real-world Use Cases
&lt;/h3&gt;

&lt;p&gt;Imagine having to quickly diagnose an issue with a specific container or needing to view the status of tasks within a cluster. Instead of navigating through the AWS Console, ecsplorer provides a streamlined terminal interface to access this information swiftly.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Does ecsplorer Stand Out?
&lt;/h3&gt;

&lt;p&gt;While there are several tools available for managing AWS ECS resources, ecsplorer offers a unique terminal-based user interface, making it stand out for users who prefer TUI over GUI. Its intuitive design and quick access commands make it a favorite among many AWS professionals.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to install
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;via go install
&lt;/li&gt;
&lt;/ul&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/masaushi/ecsplorer@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;via homebrew
&lt;/li&gt;
&lt;/ul&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;brew &lt;span class="nb"&gt;install &lt;/span&gt;masaushi/tap/ecsplorer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;download a binary from github repository
Binaries are available in the github &lt;a href="https://github.com/masaushi/ecsplorer/releases"&gt;release&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Upcoming Features
&lt;/h3&gt;

&lt;p&gt;In the future, I plan to enhance the tool with the following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More refined information display&lt;/li&gt;
&lt;li&gt;Log retrieval&lt;/li&gt;
&lt;li&gt;Creating and updating of tasks and services&lt;/li&gt;
&lt;li&gt;Other functionalities&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;ECS is truly remarkable. I hope this tool makes your ECS operations easier and boosts your productivity!&lt;/p&gt;

&lt;p&gt;I'm looking forward to getting your feedback.&lt;/p&gt;

&lt;p&gt;Have a wonderful day!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>ecs</category>
      <category>devops</category>
      <category>containers</category>
    </item>
    <item>
      <title>How to find OSS projects for your first contribution</title>
      <dc:creator>masaushi</dc:creator>
      <pubDate>Sat, 23 Oct 2021 15:07:04 +0000</pubDate>
      <link>https://dev.to/masaushi/how-to-find-oss-projects-for-your-first-contribution-54gg</link>
      <guid>https://dev.to/masaushi/how-to-find-oss-projects-for-your-first-contribution-54gg</guid>
      <description>&lt;p&gt;Contributing to OSS projects is a great activity to improve your programming skill, but you might have no idea which projects you can contribute.&lt;/p&gt;

&lt;p&gt;On Github, there is a label &lt;code&gt;good first issues&lt;/code&gt; for issues that are easy to start contributing for the first time.&lt;/p&gt;

&lt;p&gt;I found a few websites that summarize these issues, so let me introduce them to help you make your first contribution.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⭐ Recommend #1
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://good-first-issues.page"&gt;https://good-first-issues.page&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy to use&lt;/li&gt;
&lt;li&gt;Many selectable languages&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⭐ Recommend #2
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://goodfirstissue.dev"&gt;https://goodfirstissue.dev&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy to use&lt;/li&gt;
&lt;li&gt;Design is good&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⭐ Recommend #3
&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://github-help-wanted.com"&gt;http://github-help-wanted.com&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Summarize issues with &lt;code&gt;help wanted&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Searching by other labels is also possible&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;That's it!&lt;br&gt;
Hope you can find good projects to make your great contribution!&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>beginners</category>
      <category>challenge</category>
      <category>github</category>
    </item>
    <item>
      <title>[golang] Generating getter/setter methods easily</title>
      <dc:creator>masaushi</dc:creator>
      <pubDate>Sun, 17 Oct 2021 05:16:29 +0000</pubDate>
      <link>https://dev.to/masaushi/generating-accessor-methods-easily-3p61</link>
      <guid>https://dev.to/masaushi/generating-accessor-methods-easily-3p61</guid>
      <description>&lt;p&gt;Hi all,&lt;br&gt;
I have made a go tool to generate accessor methods(getter or setter) for unexported struct fields, so let me introduce it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/masaushi/accessory"&gt;https://github.com/masaushi/accessory&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i3JOwpme--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/masaushi"&gt;
        masaushi
      &lt;/a&gt; / &lt;a href="https://github.com/masaushi/accessory"&gt;
        accessory
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      accessor methods generator for Go programming language
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
accessory&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://github.com/masaushi/accessory/actions/workflows/test.yml"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KcZire5P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/masaushi/accessory/actions/workflows/test.yml/badge.svg" alt="test"&gt;&lt;/a&gt;
&lt;a href="https://github.com/masaushi/accessory/actions/workflows/release.yml"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NL7Nc4l7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/masaushi/accessory/actions/workflows/release.yml/badge.svg" alt="release"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;accessory is an accessor generator for &lt;a href="https://golang.org/" rel="nofollow"&gt;Go programming language&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
What is accessory?&lt;/h2&gt;
&lt;p&gt;Accessory is a tool that generates accessor methods from any structs.&lt;/p&gt;
&lt;p&gt;Sometimes you might make struct fields unexported in order for values of fields not to be accessed
or modified from anywhere in your codebases, and define getters or setters for values to be handled in a desired way.&lt;/p&gt;
&lt;p&gt;But writing accessors for so many fields is time-consuming, but not exciting or creative.&lt;/p&gt;
&lt;p&gt;Accessory frees you from tedious, monotonous tasks.&lt;/p&gt;
&lt;h2&gt;
Installation&lt;/h2&gt;
&lt;p&gt;To get the latest released version&lt;/p&gt;
&lt;h3&gt;
Go version &amp;lt; 1.16&lt;/h3&gt;
&lt;div class="highlight highlight-source-shell position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;go get github.com/masaushi/accessory&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
Go 1.16+&lt;/h3&gt;
&lt;div class="highlight highlight-source-shell position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;go install github.com/masaushi/accessory@latest&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
Usage&lt;/h2&gt;
&lt;h3&gt;
Declare Struct with &lt;code&gt;accessor&lt;/code&gt; Tag&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;accessory&lt;/code&gt; generates accessor methods from defined structs, so you need to declare a struct and fields with &lt;code&gt;accessor&lt;/code&gt; tag.&lt;/p&gt;
&lt;p&gt;Values for &lt;code&gt;accessor&lt;/code&gt; tag is &lt;code&gt;getter&lt;/code&gt; and &lt;code&gt;setter&lt;/code&gt;, &lt;code&gt;getter&lt;/code&gt; is for generating getter method and &lt;code&gt;setter&lt;/code&gt; is for setter methods.&lt;/p&gt;
&lt;p&gt;Here…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/masaushi/accessory"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Sometimes you might make struct fields unexported in order for values of the fields not to be accessed or modified from anywhere in your codebases.&lt;/p&gt;

&lt;p&gt;Making struct fields unexported will prevent data from unexpected use or change.&lt;br&gt;
But you sometimes might need accessor methods for some fields to get/set data in a desired way.&lt;/p&gt;

&lt;p&gt;However, writing accessors for many fields is time-consuming, but not exciting or creative.&lt;/p&gt;

&lt;p&gt;This tool frees you from that tedious, monotonous task.&lt;/p&gt;
&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;
&lt;h5&gt;
  
  
  1. Declare a model with &lt;code&gt;accessor&lt;/code&gt; tag.
&lt;/h5&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;MyStruct&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;field1&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;    &lt;span class="s"&gt;`accessor:"getter"`&lt;/span&gt;
    &lt;span class="n"&gt;field2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;      &lt;span class="s"&gt;`accessor:"setter"`&lt;/span&gt;
    &lt;span class="n"&gt;field3&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Time&lt;/span&gt; &lt;span class="s"&gt;`accessor:"getter,setter"`&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h5&gt;
  
  
  2. Run &lt;code&gt;accessory&lt;/code&gt; command
&lt;/h5&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;accessory &lt;span class="nt"&gt;-type&lt;/span&gt; MyStruct &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h5&gt;
  
  
  3. Accessor methods will be generated.
&lt;/h5&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;MyStruct&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;Field1&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;field1&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;MyStruct&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;SetField2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;val&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;field2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;val&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;MyStruct&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;Field3&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Time&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;field3&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;MyStruct&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;SetField3&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;val&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Time&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;field3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;val&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h5&gt;
  
  
  4. You can customize method name
&lt;/h5&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;MyStruct&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;field1&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="s"&gt;`accessor:"getter:GetFirstField"`&lt;/span&gt;
    &lt;span class="n"&gt;field2&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;    &lt;span class="s"&gt;`accessor:"setter:ChangeSecondField"`&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Generated methods will be&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;MyStruct&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;GetFirstField&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;field1&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;MyStruct&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;ChangeSecondField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;val&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;field2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;val&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  5. You can also generate accessors with &lt;code&gt;go generate&lt;/code&gt;
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="c"&gt;//go:generate accessory -type MyStruct&lt;/span&gt;

&lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;MyStruct&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;field1&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="s"&gt;`accessor:"getter"`&lt;/span&gt;
    &lt;span class="n"&gt;field2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;   &lt;span class="s"&gt;`accessor:"setter"`&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Generating accessors easily will save your time and help you focus on writing important business logics.&lt;/p&gt;

&lt;p&gt;I'm looking forward to getting your feedback.&lt;/p&gt;

&lt;p&gt;Have a wonderful day!&lt;/p&gt;

</description>
      <category>go</category>
      <category>productivity</category>
      <category>oop</category>
    </item>
  </channel>
</rss>
