Skip to content

koki-develop/mingo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mingo

GitHub release (latest by date) GitHub Workflow Status Go Report Card LICENSE

Go also wants to be minified.

Contents

Installation

Homebrew Tap

$ brew install koki-develop/tap/mingo

go install

$ go install github.com/koki-develop/mingo@latest

Releases

Download the binary from the releases page.

Usage

$ mingo --help
Go language also wants to be minified.

Usage:
  mingo [flags] [files]...

Flags:
  -h, --help      help for mingo
  -v, --version   version for mingo
  -w, --write     write result to (source) file instead of stdout

Example

// main.go
package main

import "fmt"

func fib(n int) int {
	if n <= 1 {
		return n
	}
	return fib(n-1) + fib(n-2)
}

func main() {
	n := 10
	for i := 0; i < n; i++ {
		fmt.Println(fib(i))
	}
}
$ mingo main.go
package main;import "fmt";func fib(n int)int{if n<=1{return n};return fib(n-1)+fib(n-2)};func main(){n:=10;for i:=0;i<n;i++{fmt.Println(fib(i))}};

An example of minifying cLive:

LICENSE

MIT