Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/asdine/cueimports

CUE tool that updates your import lines, adding missing ones and removing unused ones.
https://github.com/asdine/cueimports

cue editor-tool go

Last synced: 18 days ago
JSON representation

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

Lists

README

        

# cueimports

cueimports is a [CUE](https://github.com/cue-lang/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

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

## Usage

```bash
$ echo "data: json.Marshal({a: math.Sqrt(7)})" | cueimports
```

```
import (
"encoding/json"
"math"
)

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