Skip to content

Code-Busters-Internal/my-ls-in-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Very Simple ls command in Go

Purpose

TODO: Link to the blog article

Platform Engineering in a nutshell, is (also) about building a platform as a product to support product teams productivity. In our context, Platform Engineering is about offering self services which aim to handle the complexity of operations for developers.

So as platform engineers, we will probably have to build CLIs. We aim here to experiement, what it's like to build such tools in different languages.

DISCLAIMER

Comparing objectivly ecosytems & languages features is not our purpose here. We're more into the TMTOWTDI philosophy. Whatever you'll get from here, you will not find a 'winner', at the end of the day building CLIs is no rocket science (anymore) thanks to the large choice of library and standard around it. As long as I/O is handled within you favourite language (or ecosystem), you're good to go.

This is especially true here since languages chosen here have different level of maturity and financial support.

Also I do not have the same level of knowledge in all those languages, critics and/or tips are welcome

END OF DISCLAIMER

That being said, let's have fun !

What you'll find here

A very simple ls in gGo ...

You'll find a (very) simple implementations of the ls commnand.

Our ls will support the following options:

  • -l : use a long listing format
  • -F or --classify: append indicator */=>@|" to the entries
  • -a or --all : dot not ignore entries starting with .
  • -R or --recursive : list subdirectories recursively
  • -d or --directory : list directories not their contents
  • ...As wel has the use of no options

All explanations above are from THE MAN (man ls).

Short options concatenation is also supported:

  • ls -lR is equivalent to ls -l -R

We will aim to respect the output format of the original command but there will be differences.

... implemented in different languages

We'll use the following:

Constraints

Once good enough implementation is done in all selected languages, the following will be ensured

  1. We must provide a release for the following targets
    • Windows
    • Linux
    • OSX
    • A small benchmark must be provided
    • A CI must be included withing the project

Testing

[x] The parsing of the argument must be unit tested [ ] An integration which compares the output of the ls command with ours will be provided.

About

A very simple ls command written in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published