Skip to content

Commit

Permalink
Improve usage
Browse files Browse the repository at this point in the history
  • Loading branch information
asdine committed Sep 16, 2022
1 parent d493228 commit dc63d83
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,31 @@

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
cueimports [path ...]
$ echo "data: json.Marshal({a: math.Sqrt(7)})" | cueimports
```

```
package hello
import (
"encoding/json"
"math"
)
data: json.Marshal({a: math.Sqrt(7)})
```

0 comments on commit dc63d83

Please sign in to comment.