gomeasure

command module
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2023 License: MIT Imports: 1 Imported by: 0

README

gomeasure

gomeasure is a CLI tool that measures the lines of code and the count of files in a directory or project

Installation

Build yourself

This project is open source. You can simply clone this repo and build using:

go build -o bin/gomeasure main.go 

Download releases

Checkout the most updated releases here and download the binary that corresponds to your operating system

MacOS (homebrew)

  1. Using homebrew
$ brew tap lordvidex/lordvidex
$ brew install gomeasure
$ gomeasure --version # to confirm

Debian (amd64)

  1. To install on debian distributions copy and paste the following command in your terminal
curl "https://raw.githubusercontent.com/lordvidex/gomeasure/master/scripts/install.sh" | sh

Docker usage (new)

You can use the docker image to run gomeasure.

docker run --rm -v $(pwd):/app ghcr.io/lordvidex/gomeasure:alpine line /app
How to Use
  • The -v argument is used to mount the directory to be measured to the container's /app directory. Therefore, to measure any directory instead of the current directory, you can replace $(pwd) with the path to the directory you want to measure.
  • The --rm argument is used to remove the container after the command is executed to prevent dangling containers.
  • All arguments after the image name are passed to the gomeasure command.
  • The /app should not be replaced because source directory is mapped to /app in the container.

Uninstall

Debian (amd64)

  1. To uninstall on debian distributions copy and paste the following command in your terminal
curl "https://raw.githubusercontent.com/lordvidex/gomeasure/master/scripts/uninstall.sh" | sh

Usage

gomeasure --help

Configuration File

gomeasure uses a configuration file to make it easier to fine tune the CLI flags. gomeasure looks for a file named .gomeasure.yaml in the current directory. If it doesn't find it, it looks for it in the home directory. If no configuration file is found, it uses the default values.

Note that the priority of the configurations are as follows:

  1. CLI flags (highest priority)
  2. Configuration file (in current directory)
  3. Configuration file (in home directory)
  4. Default values (lowest priority)

Checkout the example configuration file to get started.

DISCLAIMER:

Normally, the program reads all kinds of file and returns the number of lines in each of them. Therefore, it is up to the developer to filter out the files to be scanned with flags -i and -I.

Documentation

Overview

Copyright © 2022 Evans Owamoyo <evans.dev99@gmail.com>

Package main is the entry point of the gomeasure CLI tool.

Directories

Path Synopsis
pkg
gomeasure
Package gomeasure contains the business logic or the main logic of the software
Package gomeasure contains the business logic or the main logic of the software

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL