asdine / cueimports

CUE tool that updates your import lines, adding missing ones and removing unused ones.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cueimports

cueimports is a CUE tool that updates your import lines, adding missing ones and removing unused ones.

It scans through:

  • your local packages
  • the cue.mod directory packages
  • the standard library packages

Install

go install github.com/asdine/cueimports/cmd/cueimports

Usage

$ echo "data: json.Marshal({a: math.Sqrt(7)})" | cueimports
import (
	"encoding/json"
	"math"
)

data: json.Marshal({a: math.Sqrt(7)})

About

CUE tool that updates your import lines, adding missing ones and removing unused ones.

License:MIT License


Languages

Language:Go 98.3%Language:HCL 1.7%