DEV Community

Cover image for πŸ—ž What's new and special in Create Go App CLI v1.7.0?
Vic ShΓ³stak
Vic ShΓ³stak

Posted on • Updated on

πŸ—ž What's new and special in Create Go App CLI v1.7.0?

Introduction

Hey, DEV friends! πŸ‘‹ Today, I'd like to introduce a new version of my own project Create Go App CLI, that changes some fundamental things.

Create Go App CLI

πŸ“ Table of contents

A new way to install and update CLI

Since v1.7.0, I dropped support Golang versions 1.11.x, 1.12.x, 1.13.x, 1.14.x and 1.15.x. A minimal Go version for build CLI from a source is now 1.16.x (and higher). Therefore, old way to install by go build -i ... command isn't relevant.

Please, use this command to install or update to a latest version:

go install -ldflags="-s -w" github.com/create-go-app/cli@latest
Enter fullscreen mode Exit fullscreen mode

Next, just rename binary, like this:

mv $GOPATH/bin/cli $GOPATH/bin/cgapp
Enter fullscreen mode Exit fullscreen mode

Also, macOS and GNU/Linux users available way to install via Homebrew:

# Tap a new formula:
brew tap create-go-app/cli

# Installation:
brew install create-go-app/cli/cgapp
Enter fullscreen mode Exit fullscreen mode

↑ Table of contents

How to install older versions?

You can do it by using a version suffix in go install command:

# With an indication of the exact versions:
go install github.com/create-go-app/cli@1.6.0
Enter fullscreen mode Exit fullscreen mode

Don't forget to rename binary after installation, according to the version you have installed! This must be done to avoid confusion with the latest version.

For example:

mv $GOPATH/bin/cli $GOPATH/bin/cgapp_v1_6_0
Enter fullscreen mode Exit fullscreen mode

And run it by cgapp_v1_6_0 [COMMAND].

☝️ Found all available CLI versions on pkg.go.dev page.

↑ Table of contents

Roadmap for improve this process

  • TODO: Add version for Snapcraft (for GNU/Linux users).
  • TODO: Add version for Scoop (for MS Windows users).

It would be great to read in the comments about what other installation method would be convenient for you! 😌

↑ Table of contents

Switch from my own realization for embed files to built-in feature in Go 1.16.x

Previously, to implement embedded configuration files, I used this method I described in this article in great detail:

But, a new package embed in Golang 1.16.x standard library, can do it natively, with a maximum smooth and fully DX (developer experience). So, personally, I was very much looking forward to this opportunity and immediately took advantage of it!

πŸ‘‰ Look at how much easily this code looks now and how it looked in the past. At the same time, this code performs the same function: it adds the config files to the binary. How magical it is!

↑ Table of contents

Switch from Taskfile.yml to simple Makefiles

Yes, I thought I could replace the good old Makefile with some modern solution for automating commonly used commands for a project... but I was wrong! So, I made the willful decision to go back to the roots.

Makefile

In this version (and later), support for Taskfile will be dropped throughout the Create Go App project (both in the CLI and in production-ready templates).

Make a make run not a task run now.

I say "thank you" to the developers of this tool, but habit is much stronger! πŸ˜‰

↑ Table of contents

Add support for Apple Silicon CPUs

Now, in assets of every release (at GitHub repository), I put special binary version for beautiful working Create Go App CLI on the Mac computers with Apple-designed processors (M1 and higher).

version for Apple Silicon CPUs

Wikipedia: The M1 chip, Apple's first processor designed for use in Macs, is manufactured using TSMC's 5 nm process. It was announced on November 10, 2020, and is used in the M1 MacBook Air, Mac mini, and MacBook Pro (2020).

↑ Table of contents

Photos by

P.S.

If you want more articles (like this) on this blog, then post a comment below and subscribe to me. Thanks! 😻

❗️ You can support me on Boosty, both on a permanent and on a one-time basis. All proceeds from this way will go to support my OSS projects and will energize me to create new products and articles for the community.

support me on Boosty

And of course, you can help me make developers' lives even better! Just connect to one of my projects as a contributor. It's easy!

My main projects that need your help (and stars) πŸ‘‡

  • πŸ”₯ gowebly: A next-generation CLI tool that makes it easy to create amazing web applications with Go on the backend, using htmx, hyperscript or Alpine.js and the most popular CSS frameworks on the frontend.
  • ✨ create-go-app: Create a new production-ready project with Go backend, frontend and deploy automation by running one CLI command.

Other my small projects: yatr, gosl, json2csv, csv2api.

Top comments (0)