README.md 1.1 KB
Newer Older
P
Phodal HUANG 已提交
1
# Coca
P
Phodal HUANG 已提交
2

P
Phodal Huang 已提交
3 4 5 6 7 8 9 10
## Usage

install 

```
go get https://github.com/phodal/coca
```

P
Phodal Huang 已提交
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

help:

```
Usage:
  coca [command]

Available Commands:
  analysis    analysis package
  api         scan api
  call        call graph api
  concept     concept api
  help        Help about any command
  refactor    auto refactor code

```


P
Phodal Huang 已提交
29 30 31 32 33 34 35 36 37 38 39 40 41
Analysis

```
coca analysis -p [PATH]
```

Refactor

```
coca refactor -R rename.coca -D deps.json -p src/main
coca refactor -m move.config -p .
```

P
Phodal HUANG 已提交
42 43
## Dev

P
Phodal Huang 已提交
44
Install Go
P
Phodal HUANG 已提交
45 46 47 48 49

```bash
brew install go
```

P
Phodal Huang 已提交
50
Env
P
Phodal HUANG 已提交
51 52 53 54 55 56 57

```bash
export GOROOT=/usr/local/opt/go/libexec
export GOPATH=$HOME/.go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
```

P
Phodal Huang 已提交
58
clone
P
Phodal HUANG 已提交
59 60

```
P
Phodal Huang 已提交
61
go get https://github.com/phodal/coca
P
Phodal HUANG 已提交
62 63
```

P
Phodal Huang 已提交
64
Test Frameworks
P
Phodal HUANG 已提交
65 66 67 68

```
go get github.com/onsi/ginkgo
go get github.com/onsi/gomega
P
Phodal HUANG 已提交
69 70
```

P
Phodal HUANG 已提交
71
### Refs
P
Phodal HUANG 已提交
72

P
Phodal Huang 已提交
73
[https://github.com/MontFerret/ferret](https://github.com/MontFerret/ferret)
P
Phodal Huang 已提交
74 75 76 77 78 79 80

License
---

[![Phodal's Idea](http://brand.phodal.com/shields/idea-small.svg)](http://ideas.phodal.com/)

@ 2019 A [Phodal Huang](https://www.phodal.com)'s [Idea](http://github.com/phodal/ideas).  This code is distributed under the MIT license. See `LICENSE` in this directory.