Compare commits
7 Commits
0.9.45-alp
...
demo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
913b2fceea | ||
|
|
fbb33e444b | ||
|
|
13d22c7885 | ||
|
|
9582c06a08 | ||
|
|
9e7de8be7a | ||
|
|
b668d7c397 | ||
|
|
6bcc471f4d |
12
.github/workflows/docker.yml
vendored
12
.github/workflows/docker.yml
vendored
@@ -68,3 +68,15 @@ jobs:
|
||||
run: |
|
||||
docker build -t metrue/fx-julia-base:latest -f ./assets/dockerfiles/base/julia/Dockerfile ./assets/dockerfiles/base/julia
|
||||
docker push metrue/fx-julia-base:latest
|
||||
|
||||
- name: build and publish fx crystal image
|
||||
if: always()
|
||||
run: |
|
||||
docker build -t metrue/fx-crystal-base:latest -f ./assets/dockerfiles/base/crystal/Dockerfile ./assets/dockerfiles/base/crystal
|
||||
docker push metrue/fx-crystal-base:latest
|
||||
|
||||
- name: build and publish fx php image
|
||||
if: always()
|
||||
run: |
|
||||
docker build -t metrue/fx-php-base:latest -f ./assets/dockerfiles/base/php/Dockerfile ./assets/dockerfiles/base/php
|
||||
docker push metrue/fx-php-base:latest
|
||||
|
||||
6
Makefile
6
Makefile
@@ -8,7 +8,9 @@ lint:
|
||||
docker run --rm -v $(CURDIR):/app -w /app golangci/golangci-lint golangci-lint run -v
|
||||
|
||||
generate:
|
||||
packr
|
||||
go get -u github.com/gobuffalo/packr/v2/...
|
||||
go get -u github.com/gobuffalo/packr/v2/packr2
|
||||
packr2
|
||||
|
||||
b:
|
||||
go build -ldflags="-s -w" -o ${OUTPUT_DIR}/fx fx.go
|
||||
@@ -33,7 +35,7 @@ cli-test-ci:
|
||||
./scripts/test_cli.sh 'js'
|
||||
|
||||
cli-test:
|
||||
./scripts/test_cli.sh 'js rb py go java d pl'
|
||||
./scripts/test_cli.sh 'js rb py go java d pl php'
|
||||
|
||||
http-test:
|
||||
./scripts/http_test.sh
|
||||
|
||||
@@ -36,6 +36,7 @@ Feel free hacking fx to support the languages not listed. Welcome to tweet me [@
|
||||
| Julia | Supported | [@matbesancon](https://github.com/matbesancon)| [/examples/Julia](https://github.com/metrue/fx/tree/master/examples/functions/Julia) |
|
||||
| D | Supported | [@andre2007](https://github.com/andre2007)| [/examples/D](https://github.com/metrue/fx/tree/master/examples/functions/D) |
|
||||
| Perl | Supported | fx | [/examples/Perl](https://github.com/metrue/fx/tree/master/examples/functions/Perl) |
|
||||
| Crystal | Supported | [@mvrilo](https://github.com/mvrilo) | [/examples/Crystal](https://github.com/metrue/fx/tree/master/examples/functions/Crystal) |
|
||||
| R | Working on [need your help](https://github.com/metrue/fx/issues/31) | ||
|
||||
|
||||
# Installation
|
||||
|
||||
7
assets/dockerfiles/base/crystal/Dockerfile
vendored
Normal file
7
assets/dockerfiles/base/crystal/Dockerfile
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM crystallang/crystal:latest
|
||||
|
||||
WORKDIR /fx
|
||||
|
||||
COPY . /fx
|
||||
|
||||
RUN shards install
|
||||
18
assets/dockerfiles/base/crystal/shard.lock
vendored
Normal file
18
assets/dockerfiles/base/crystal/shard.lock
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
version: 2.0
|
||||
shards:
|
||||
exception_page:
|
||||
git: https://github.com/crystal-loot/exception_page.git
|
||||
version: 0.1.4
|
||||
|
||||
kemal:
|
||||
git: https://github.com/kemalcr/kemal.git
|
||||
version: 0.26.1
|
||||
|
||||
kilt:
|
||||
git: https://github.com/jeromegn/kilt.git
|
||||
version: 0.4.0
|
||||
|
||||
radix:
|
||||
git: https://github.com/luislavena/radix.git
|
||||
version: 0.3.9
|
||||
|
||||
6
assets/dockerfiles/base/crystal/shard.yml
vendored
Normal file
6
assets/dockerfiles/base/crystal/shard.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
name: fx-crystal-base
|
||||
version: 0.1.0
|
||||
dependencies:
|
||||
kemal:
|
||||
github: kemalcr/kemal
|
||||
commit: a819d4792bbc63d993d6dd2b15f9af5efb0c2d8c
|
||||
1
assets/dockerfiles/base/php/Dockerfile
vendored
Normal file
1
assets/dockerfiles/base/php/Dockerfile
vendored
Normal file
@@ -0,0 +1 @@
|
||||
FROM php:latest
|
||||
@@ -4,12 +4,14 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/metrue/fx/bundler"
|
||||
"github.com/metrue/fx/bundler/crystal"
|
||||
"github.com/metrue/fx/bundler/d"
|
||||
golang "github.com/metrue/fx/bundler/go"
|
||||
"github.com/metrue/fx/bundler/java"
|
||||
"github.com/metrue/fx/bundler/julia"
|
||||
"github.com/metrue/fx/bundler/node"
|
||||
"github.com/metrue/fx/bundler/perl"
|
||||
"github.com/metrue/fx/bundler/php"
|
||||
"github.com/metrue/fx/bundler/python"
|
||||
"github.com/metrue/fx/bundler/ruby"
|
||||
"github.com/metrue/fx/bundler/rust"
|
||||
@@ -37,6 +39,10 @@ func Bundle(workdir string, language string, fn string, deps ...string) error {
|
||||
bundler = ruby.New()
|
||||
case "rust":
|
||||
bundler = rust.New()
|
||||
case "crystal":
|
||||
bundler = crystal.New()
|
||||
case "php":
|
||||
bundler = php.New()
|
||||
default:
|
||||
return fmt.Errorf("%s not suppported yet", language)
|
||||
}
|
||||
|
||||
13
bundler/crystal/a_crystal-packr.go.tmpl
Normal file
13
bundler/crystal/a_crystal-packr.go.tmpl
Normal file
@@ -0,0 +1,13 @@
|
||||
// Code generated by github.com/gobuffalo/packr. DO NOT EDIT.
|
||||
|
||||
package crystal
|
||||
|
||||
import "github.com/gobuffalo/packr"
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
func init() {
|
||||
_ = packr.PackJSONBytes("crystal", "Dockerfile", "\"RlJPTSBtZXRydWUvZngtY3J5c3RhbC1iYXNlCgpFWFBPU0UgMzAwMAoKQ09QWSAuIC4KClJVTiBjcnlzdGFsIGJ1aWxkIC0tdmVyYm9zZSAgLW8gLi9meGNyIC4vKi5jcgoKQ01EIFsiLi9meGNyIl0K\"")
|
||||
_ = packr.PackJSONBytes("crystal", "app.cr", "\"cmVxdWlyZSAia2VtYWwiCnJlcXVpcmUgImd6aXAiCnJlcXVpcmUgImpzb24iCnJlcXVpcmUgIi4vZngiCgpwb3N0ICIvIiBkbyB8Y3R4fAogICAgZnggY3R4CmVuZAoKZ2V0ICIvIiBkbyB8Y3R4fAogICAgZnggY3R4CmVuZAoKS2VtYWwucnVuCg==\"")
|
||||
_ = packr.PackJSONBytes("crystal", "fx.cr", "\"ZGVmIGZ4KGN0eCkKICAiaGVsbG8gd29ybGQiCmVuZAo=\"")
|
||||
}
|
||||
9
bundler/crystal/assets/Dockerfile
Normal file
9
bundler/crystal/assets/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM metrue/fx-crystal-base
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN crystal build --verbose -o ./fxcr ./*.cr
|
||||
|
||||
CMD ["./fxcr"]
|
||||
14
bundler/crystal/assets/app.cr
Normal file
14
bundler/crystal/assets/app.cr
Normal file
@@ -0,0 +1,14 @@
|
||||
require "kemal"
|
||||
require "gzip"
|
||||
require "json"
|
||||
require "./fx"
|
||||
|
||||
post "/" do |ctx|
|
||||
fx ctx
|
||||
end
|
||||
|
||||
get "/" do |ctx|
|
||||
fx ctx
|
||||
end
|
||||
|
||||
Kemal.run
|
||||
3
bundler/crystal/assets/fx.cr
Normal file
3
bundler/crystal/assets/fx.cr
Normal file
@@ -0,0 +1,3 @@
|
||||
def fx(ctx)
|
||||
"hello world"
|
||||
end
|
||||
32
bundler/crystal/crystal.go
Normal file
32
bundler/crystal/crystal.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package crystal
|
||||
|
||||
import (
|
||||
"github.com/gobuffalo/packr/v2"
|
||||
"github.com/metrue/fx/bundler"
|
||||
)
|
||||
|
||||
// Crystal defines crystal bundler
|
||||
type Crystal struct {
|
||||
assets *packr.Box
|
||||
}
|
||||
|
||||
// New a crystal bundler
|
||||
func New() *Crystal {
|
||||
return &Crystal{
|
||||
assets: packr.New("crystal", "./assets"),
|
||||
}
|
||||
}
|
||||
|
||||
// Scaffold a crystal/kemal app
|
||||
func (k *Crystal) Scaffold(output string) error {
|
||||
return bundler.Restore(k.assets, output)
|
||||
}
|
||||
|
||||
// Bundle a function into a kemal project
|
||||
func (k *Crystal) Bundle(output string, fn string, deps ...string) error {
|
||||
return bundler.Bundle(k.assets, output, "crystal", fn, deps...)
|
||||
}
|
||||
|
||||
var (
|
||||
_ bundler.Bundler = &Crystal{}
|
||||
)
|
||||
143
bundler/crystal/crystal_test.go
Normal file
143
bundler/crystal/crystal_test.go
Normal file
@@ -0,0 +1,143 @@
|
||||
package crystal
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/metrue/fx/utils"
|
||||
)
|
||||
|
||||
func TestCrystalBundler(t *testing.T) {
|
||||
t.Run("Scaffold", func(t *testing.T) {
|
||||
outputDir, err := ioutil.TempDir("", "fx_crystal")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(outputDir)
|
||||
|
||||
crystal := New()
|
||||
if err := crystal.Scaffold(outputDir); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
diff, _, _, err := utils.Diff(outputDir, "./assets")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if diff {
|
||||
t.Fatalf("%s is not equal with %s", outputDir, "./assets")
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("BundleSingleFunc", func(t *testing.T) {
|
||||
fd, err := ioutil.TempFile("", "fx_func_*.crystal")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.Remove(fd.Name())
|
||||
|
||||
content := `def fx(ctx)
|
||||
"hello world"
|
||||
end`
|
||||
err = ioutil.WriteFile(fd.Name(), []byte(content), 0666)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
outputDir, err := ioutil.TempDir("", "fx_crystal")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(outputDir)
|
||||
|
||||
crystal := New()
|
||||
if err := crystal.Bundle(outputDir, fd.Name()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
diff, pre, cur, err := utils.Diff("./assets", outputDir)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if !diff {
|
||||
t.Fatalf("handle function should be changed")
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(cur, []byte(content)) {
|
||||
t.Fatalf("it should be %s but got %s", content, cur)
|
||||
}
|
||||
|
||||
preHandleFunc, err := ioutil.ReadFile("./assets/fx.cr")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !reflect.DeepEqual(pre, preHandleFunc) {
|
||||
{
|
||||
}
|
||||
t.Fatalf("it should get %s but got %s", preHandleFunc, pre)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("BundleFuncAndDeps", func(t *testing.T) {
|
||||
fd, err := ioutil.TempFile("", "fx_func_*.cr")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.Remove(fd.Name())
|
||||
|
||||
content, err := ioutil.ReadFile("./assets/fx.cr")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
err = ioutil.WriteFile(fd.Name(), content, 0666)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
addFunc := `def fx(a, b)
|
||||
a + b
|
||||
end
|
||||
`
|
||||
addFd, err := ioutil.TempFile("", "fx_add_func_*.cr")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
err = ioutil.WriteFile(addFd.Name(), []byte(addFunc), 0644)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
outputDir, err := ioutil.TempDir("", "fx_crystal")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(outputDir)
|
||||
|
||||
crystal := New()
|
||||
if err := crystal.Bundle(outputDir, fd.Name(), addFd.Name()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
diff, pre, cur, err := utils.Diff("./assets", outputDir)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if !diff {
|
||||
t.Fatalf("handle function should be changed")
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(cur, []byte(addFunc)) {
|
||||
t.Fatalf("it should be %s but got %s", content, cur)
|
||||
}
|
||||
if pre != nil {
|
||||
t.Fatal(pre)
|
||||
}
|
||||
})
|
||||
}
|
||||
14
bundler/d/a_d-packr.go.tmpl
Normal file
14
bundler/d/a_d-packr.go.tmpl
Normal file
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
||||
// +build !skippackr
|
||||
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
package d
|
||||
|
||||
import _ "github.com/metrue/fx/packrd"
|
||||
13
bundler/go/a_golang-packr.go.tmpl
Normal file
13
bundler/go/a_golang-packr.go.tmpl
Normal file
@@ -0,0 +1,13 @@
|
||||
// Code generated by github.com/gobuffalo/packr. DO NOT EDIT.
|
||||
|
||||
package golang
|
||||
|
||||
import "github.com/gobuffalo/packr"
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
func init() {
|
||||
_ = packr.PackJSONBytes("go", "Dockerfile", "\"RlJPTSBtZXRydWUvZngtZ28tYmFzZQoKQ09QWSAuIC9nby9zcmMvZ2l0aHViLmNvbS9tZXRydWUvZngKV09SS0RJUiAvZ28vc3JjL2dpdGh1Yi5jb20vbWV0cnVlL2Z4CgpSVU4gZ28gYnVpbGQgLWxkZmxhZ3MgIi13IC1zIiAtbyBmeCBmeC5nbyBhcHAuZ28KCkVYUE9TRSAzMDAwCgpDTUQgWyIuL2Z4Il0K\"")
|
||||
_ = packr.PackJSONBytes("go", "app.go", "\"cGFja2FnZSBtYWluCgppbXBvcnQgKAoJImdpdGh1Yi5jb20vZ2luLWdvbmljL2dpbiIKKQoKZnVuYyBtYWluKCkgewoJciA6PSBnaW4uRGVmYXVsdCgpCglyLkdFVCgiLyIsIGZ4KQoJci5QT1NUKCIvIiwgZngpCglpZiBlcnIgOj0gci5SdW4oIjozMDAwIik7IGVyciAhPSBuaWwgewoJCXBhbmljKGVycikKCX0KfQo=\"")
|
||||
_ = packr.PackJSONBytes("go", "fx.go", "\"cGFja2FnZSBtYWluCgppbXBvcnQgImdpdGh1Yi5jb20vZ2luLWdvbmljL2dpbiIKCmZ1bmMgZngoY3R4ICpnaW4uQ29udGV4dCkgewoJY3R4LkpTT04oMjAwLCBnaW4uSHsKCQkibWVzc2FnZSI6ICJoZWxsbyB3b3JsZCIsCgl9KQp9Cg==\"")
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// +build !skippackr
|
||||
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
package golang
|
||||
|
||||
import _ "github.com/metrue/fx/packrd"
|
||||
14
bundler/java/a_java-packr.go.tmpl
Normal file
14
bundler/java/a_java-packr.go.tmpl
Normal file
@@ -0,0 +1,14 @@
|
||||
// Code generated by github.com/gobuffalo/packr. DO NOT EDIT.
|
||||
|
||||
package java
|
||||
|
||||
import "github.com/gobuffalo/packr"
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
func init() {
|
||||
_ = packr.PackJSONBytes("java", "Dockerfile", "\"RlJPTSBtZXRydWUvZngtamF2YS1iYXNlCgojIEFkZGluZyBzb3VyY2UsIGNvbXBpbGUgYW5kIHBhY2thZ2UgaW50byBhIGZhdCBqYXIKQUREIHNyYyAvY29kZS9zcmMKUlVOIFsibXZuIiwgInBhY2thZ2UiXQoKRVhQT1NFIDMwMDAKQ01EIFsiL3Vzci9saWIvanZtL2phdmEtOC1vcGVuamRrLWFtZDY0L2Jpbi9qYXZhIiwgIi1qYXIiLCAidGFyZ2V0L2Z4LWFwcC1qYXZhLTAuMS4wLmphciJdCg==\"")
|
||||
_ = packr.PackJSONBytes("java", "pom.xml", "\"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHByb2plY3QgeG1sbnM9Imh0dHA6Ly9tYXZlbi5hcGFjaGUub3JnL1BPTS80LjAuMCIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIKICAgIHhzaTpzY2hlbWFMb2NhdGlvbj0iaHR0cDovL21hdmVuLmFwYWNoZS5vcmcvUE9NLzQuMC4wIGh0dHA6Ly9tYXZlbi5hcGFjaGUub3JnL21hdmVuLXY0XzBfMC54c2QiPgogICAgPG1vZGVsVmVyc2lvbj40LjAuMDwvbW9kZWxWZXJzaW9uPgogICAgPGdyb3VwSWQ+b3JnLnNwcmluZ2ZyYW1ld29yazwvZ3JvdXBJZD4KICAgIDxhcnRpZmFjdElkPmZ4LWFwcC1qYXZhPC9hcnRpZmFjdElkPgogICAgPHBhY2thZ2luZz5qYXI8L3BhY2thZ2luZz4KICAgIDx2ZXJzaW9uPjAuMS4wPC92ZXJzaW9uPgoKICAgIDxidWlsZD4KICAgICAgICA8cGx1Z2lucz4KICAgICAgICAgICAgPHBsdWdpbj4KICAgICAgICAgICAgICAgIDxncm91cElkPm9yZy5hcGFjaGUubWF2ZW4ucGx1Z2luczwvZ3JvdXBJZD4KICAgICAgICAgICAgICAgIDxhcnRpZmFjdElkPm1hdmVuLXNoYWRlLXBsdWdpbjwvYXJ0aWZhY3RJZD4KICAgICAgICAgICAgICAgIDx2ZXJzaW9uPjIuMTwvdmVyc2lvbj4KICAgICAgICAgICAgICAgIDxleGVjdXRpb25zPgogICAgICAgICAgICAgICAgICAgIDxleGVjdXRpb24+CiAgICAgICAgICAgICAgICAgICAgICAgIDxwaGFzZT5wYWNrYWdlPC9waGFzZT4KICAgICAgICAgICAgICAgICAgICAgICAgPGdvYWxzPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGdvYWw+c2hhZGU8L2dvYWw+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvZ29hbHM+CiAgICAgICAgICAgICAgICAgICAgICAgIDxjb25maWd1cmF0aW9uPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRyYW5zZm9ybWVycz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHJhbnNmb3JtZXIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1wbGVtZW50YXRpb249Im9yZy5hcGFjaGUubWF2ZW4ucGx1Z2lucy5zaGFkZS5yZXNvdXJjZS5NYW5pZmVzdFJlc291cmNlVHJhbnNmb3JtZXIiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bWFpbkNsYXNzPmZ4LmFwcDwvbWFpbkNsYXNzPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdHJhbnNmb3JtZXI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RyYW5zZm9ybWVycz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9jb25maWd1cmF0aW9uPgogICAgICAgICAgICAgICAgICAgIDwvZXhlY3V0aW9uPgogICAgICAgICAgICAgICAgPC9leGVjdXRpb25zPgogICAgICAgICAgICA8L3BsdWdpbj4KICAgICAgICA8L3BsdWdpbnM+CiAgICA8L2J1aWxkPgogICAgPHByb3BlcnRpZXM+CiAgICAgICAgPG1hdmVuLmNvbXBpbGVyLnNvdXJjZT44PC9tYXZlbi5jb21waWxlci5zb3VyY2U+CiAgICAgICAgPG1hdmVuLmNvbXBpbGVyLnRhcmdldD44PC9tYXZlbi5jb21waWxlci50YXJnZXQ+CiAgPC9wcm9wZXJ0aWVzPgogIDxkZXBlbmRlbmNpZXM+CiAgPGRlcGVuZGVuY3k+CiAgICA8Z3JvdXBJZD5pby5qYXZhbGluPC9ncm91cElkPgogICAgPGFydGlmYWN0SWQ+amF2YWxpbjwvYXJ0aWZhY3RJZD4KICAgIDx2ZXJzaW9uPjEuMS4xPC92ZXJzaW9uPgogIDwvZGVwZW5kZW5jeT4KICA8ZGVwZW5kZW5jeT4KICAgIDxncm91cElkPm9yZy5qc29uPC9ncm91cElkPgogICAgPGFydGlmYWN0SWQ+anNvbjwvYXJ0aWZhY3RJZD4KICAgIDx2ZXJzaW9uPjIwMTcxMDE4PC92ZXJzaW9uPgogIDwvZGVwZW5kZW5jeT4KICA8L2RlcGVuZGVuY2llcz4KPC9wcm9qZWN0Pgo=\"")
|
||||
_ = packr.PackJSONBytes("java", "src/main/java/fx/Fx.java", "\"cGFja2FnZSBmeDsKCmltcG9ydCBvcmcuanNvbi5KU09OT2JqZWN0OwoKcHVibGljIGNsYXNzIEZ4IHsKICAgIHB1YmxpYyBpbnQgaGFuZGxlKEpTT05PYmplY3QgaW5wdXQpIHsKICAgICAgICBTdHJpbmcgYSA9IGlucHV0LmdldCgiYSIpLnRvU3RyaW5nKCk7CiAgICAgICAgU3RyaW5nIGIgPSBpbnB1dC5nZXQoImIiKS50b1N0cmluZygpOwogICAgICAgIHJldHVybiBJbnRlZ2VyLnBhcnNlSW50KGEpICsgSW50ZWdlci5wYXJzZUludChiKTsKICAgIH0KfQo=\"")
|
||||
_ = packr.PackJSONBytes("java", "src/main/java/fx/app.java", "\"cGFja2FnZSBmeDsKCmltcG9ydCBpby5qYXZhbGluLkphdmFsaW47CmltcG9ydCBvcmcuanNvbi5KU09OT2JqZWN0OwoKcHVibGljIGNsYXNzIGFwcCB7CiAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB7CiAgICAgICAgSmF2YWxpbiBhcHAgPSBKYXZhbGluLnN0YXJ0KDMwMDApOwogICAgICAgIEZ4IGhhbmRsZXIgPSBuZXcgRngoKTsKICAgICAgICBhcHAucG9zdCgiLyIsIGN0eCAtPiB7CiAgICAgICAgICAgIEpTT05PYmplY3Qgb2JqID0gbmV3IEpTT05PYmplY3QoY3R4LmJvZHkoKSk7CiAgICAgICAgICAgIGN0eC5yZXN1bHQoIiIraGFuZGxlci5oYW5kbGUob2JqKSk7CiAgICAgICAgfSk7CiAgICB9Cn0K\"")
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// +build !skippackr
|
||||
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
package java
|
||||
|
||||
import _ "github.com/metrue/fx/packrd"
|
||||
15
bundler/julia/a_julia-packr.go.tmpl
Normal file
15
bundler/julia/a_julia-packr.go.tmpl
Normal file
@@ -0,0 +1,15 @@
|
||||
// Code generated by github.com/gobuffalo/packr. DO NOT EDIT.
|
||||
|
||||
package julia
|
||||
|
||||
import "github.com/gobuffalo/packr"
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
func init() {
|
||||
_ = packr.PackJSONBytes("julia", "Dockerfile", "\"RlJPTSBqdWxpYTowLjcKCkNPUFkgLiAvYXBwCgpSVU4gYXB0LWdldCB1cGRhdGUgJiYgYXB0LWdldCBpbnN0YWxsIC15IGdjYyBhcHQtdXRpbHMgdW56aXAgbWFrZSBsaWJodHRwLXBhcnNlci1kZXYKUlVOIGp1bGlhIC9hcHAvZGVwcy5qbAoKQ01EIGp1bGlhIC9hcHAvYXBwLmpsCkVYUE9TRSAzMDAwCg==\"")
|
||||
_ = packr.PackJSONBytes("julia", "REQUIRE", "\"SHR0cFBhcnNlcgpIdHRwU2VydmVyCkpTT04KVW5tYXJzaGFs\"")
|
||||
_ = packr.PackJSONBytes("julia", "app.jl", "\"dXNpbmcgSHR0cFNlcnZlcgppbXBvcnQgSlNPTgppbXBvcnQgVW5tYXJzaGFsCgppbmNsdWRlKCJmeC5qbCIpCgpzcnYgPSBTZXJ2ZXIoKSBkbyByZXE6OlJlcXVlc3QsIHJlczo6UmVzcG9uc2UKICAgIGlmIGxlbmd0aChyZXEuZGF0YSkgPT0gMAogICAgICAgIHJlcy5zdGF0dXMgPSA0MDAKICAgIGVsc2UKICAgICAgICBwYXJzZWRfZGF0YSA9IEpTT04uUGFyc2VyLnBhcnNlKGpvaW4oW0NoYXIodikgZm9yIHYgaW4gcmVxLmRhdGFdKSkKICAgICAgICBkYXRhID0gVW5tYXJzaGFsLnVubWFyc2hhbChJbnB1dCwgcGFyc2VkX2RhdGEpCiAgICAgICAgc3RyaW5nKGZ4KGRhdGEpKQogICAgZW5kCmVuZAoKcnVuKHNydiwgMzAwMCkK\"")
|
||||
_ = packr.PackJSONBytes("julia", "deps.jl", "\"b3BlbigiL2FwcC9SRVFVSVJFIikgZG8gZgoJZGVwcyA9IHJlYWRsaW5lcyhmKQoJZm9yIGQgaW4gZGVwcwoJCVBrZy5hZGQoZCkKCWVuZAplbmQKUGtnLmJ1aWxkKCJIdHRwUGFyc2VyIikK\"")
|
||||
_ = packr.PackJSONBytes("julia", "fx.jl", "\"c3RydWN0IElucHV0CiAgICBhOjpOdW1iZXIKICAgIGI6Ok51bWJlcgplbmQKCmZ4ID0gZnVuY3Rpb24oaW5wdXQ6OklucHV0KQogICAgcmV0dXJuIGlucHV0LmEgKyBpbnB1dC5iCmVuZAo=\"")
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// +build !skippackr
|
||||
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
package julia
|
||||
|
||||
import _ "github.com/metrue/fx/packrd"
|
||||
13
bundler/node/a_node-packr.go.tmpl
Normal file
13
bundler/node/a_node-packr.go.tmpl
Normal file
@@ -0,0 +1,13 @@
|
||||
// Code generated by github.com/gobuffalo/packr. DO NOT EDIT.
|
||||
|
||||
package node
|
||||
|
||||
import "github.com/gobuffalo/packr"
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
func init() {
|
||||
_ = packr.PackJSONBytes("node", "Dockerfile", "\"RlJPTSBtZXRydWUvZngtbm9kZS1iYXNlCgpDT1BZIC4gLgpFWFBPU0UgMzAwMApDTUQgWyJub2RlIiwgImFwcC5qcyJdCg==\"")
|
||||
_ = packr.PackJSONBytes("node", "app.js", "\"Y29uc3QgS29hID0gcmVxdWlyZSgna29hJyk7CmNvbnN0IGJvZHlQYXJzZXIgPSByZXF1aXJlKCdrb2EtYm9keXBhcnNlcicpOwpjb25zdCBjb3JzID0gcmVxdWlyZSgnQGtvYS9jb3JzJyk7CmNvbnN0IHN3U3RhdHMgPSByZXF1aXJlKCdzd2FnZ2VyLXN0YXRzJyk7CmNvbnN0IGUyayA9IHJlcXVpcmUoJ2V4cHJlc3MtdG8ta29hJyk7CmNvbnN0IGZ4ID0gcmVxdWlyZSgnLi9meCcpOwoKY29uc3QgYXBwID0gbmV3IEtvYSgpOwoKYXBwLnVzZShlMmsoc3dTdGF0cy5nZXRNaWRkbGV3YXJlKHt9KSkpOwphcHAudXNlKGNvcnMoewogIG9yaWdpbjogJyonLAp9KSk7CmFwcC51c2UoYm9keVBhcnNlcigpKTsKYXBwLnVzZShmeCk7CgphcHAubGlzdGVuKDMwMDApOwo=\"")
|
||||
_ = packr.PackJSONBytes("node", "fx.js", "\"bW9kdWxlLmV4cG9ydHMgPSAoY3R4KSA9PiB7CiAgY3R4LmJvZHkgPSAnaGVsbG8gd29ybGQnCn0K\"")
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// +build !skippackr
|
||||
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
package node
|
||||
|
||||
import _ "github.com/metrue/fx/packrd"
|
||||
13
bundler/perl/a_perl-packr.go.tmpl
Normal file
13
bundler/perl/a_perl-packr.go.tmpl
Normal file
@@ -0,0 +1,13 @@
|
||||
// Code generated by github.com/gobuffalo/packr. DO NOT EDIT.
|
||||
|
||||
package perl
|
||||
|
||||
import "github.com/gobuffalo/packr"
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
func init() {
|
||||
_ = packr.PackJSONBytes("perl", "Dockerfile", "\"RlJPTSBtZXRydWUvZngtcGVybC1iYXNlCgpBREQgLiAuCgpFWFBPU0UgMzAwMApDTUQgWyJwZXJsIiwgImFwcC5wbCIsICJkYWVtb24iXQo=\"")
|
||||
_ = packr.PackJSONBytes("perl", "app.pl", "\"dXNlIE1vam9saWNpb3VzOjpMaXRlOwoKcmVxdWlyZSAiLi9meC5wbCI7CgpnZXQgJy8nID0+IHN1YiB7CiAgbXkgJGN0eCA9IHNoaWZ0OwogIG15ICRyZXMgPSBmeCgkY3R4KTsKICAkY3R4LT5yZW5kZXIoanNvbiA9PiAkcmVzKTsKfTsKCnBvc3QgJy8nID0+IHN1YiB7CiAgbXkgJGN0eCA9IHNoaWZ0OwogIG15ICRyZXMgPSBmeCgkY3R4KTsKICAkY3R4LT5yZW5kZXIoanNvbiA9PiAkcmVzKTsKfTsKCmFwcC0+c3RhcnQ7Cg==\"")
|
||||
_ = packr.PackJSONBytes("perl", "fx.pl", "\"c3ViIGZ4IHsKICBteSAkY3R4ID0gc2hpZnQ7CiAgcmV0dXJuICdoZWxsbyBmeCcKfQoKMTsK\"")
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// +build !skippackr
|
||||
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
package perl
|
||||
|
||||
import _ "github.com/metrue/fx/packrd"
|
||||
13
bundler/php/a_php-packr.go.tmpl
Normal file
13
bundler/php/a_php-packr.go.tmpl
Normal file
@@ -0,0 +1,13 @@
|
||||
// Code generated by github.com/gobuffalo/packr. DO NOT EDIT.
|
||||
|
||||
package php
|
||||
|
||||
import "github.com/gobuffalo/packr"
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
func init() {
|
||||
_ = packr.PackJSONBytes("php", "Dockerfile", "\"RlJPTSBtZXRydWUvZngtcGhwLWJhc2UKCkNPUFkgLiAuCgpFWFBPU0UgMzAwMAoKQ01EIHBocCAtUyAwLjAuMC4wOjMwMDAK\"")
|
||||
_ = packr.PackJSONBytes("php", "app.php", "\"PD9waHAKICAgIGluY2x1ZGUoImZ4LnBocCIpOwogICAgJGRhdGEgPSBmaWxlX2dldF9jb250ZW50cygicGhwOi8vaW5wdXQiKTsKICAgICRyZXMgPSBqc29uX2RlY29kZSgkZGF0YSx0cnVlKTsKICAgICR2ID0gRngoJHJlc1siYSJdLCRyZXNbImIiXSk7CiAgICBlY2hvICR2Owo=\"")
|
||||
_ = packr.PackJSONBytes("php", "fx.php", "\"PD9waHAKICAgIGZ1bmN0aW9uIEZ4KCRhLCRiKSB7CiAgICAgICAgcmV0dXJuICRhKyRiOwogICAgfQo=\"")
|
||||
}
|
||||
7
bundler/php/assets/Dockerfile
Normal file
7
bundler/php/assets/Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM metrue/fx-php-base
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD php -S 0.0.0.0:3000
|
||||
4
bundler/php/assets/fx.php
Normal file
4
bundler/php/assets/fx.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
function Fx($a,$b) {
|
||||
return $a+$b;
|
||||
}
|
||||
6
bundler/php/assets/index.php
Normal file
6
bundler/php/assets/index.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
include("fx.php");
|
||||
$data = file_get_contents("php://input");
|
||||
$res = json_decode($data,true);
|
||||
$v = Fx($res["a"],$res["b"]);
|
||||
echo $v;
|
||||
32
bundler/php/php.go
Normal file
32
bundler/php/php.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package php
|
||||
|
||||
import (
|
||||
"github.com/gobuffalo/packr/v2"
|
||||
"github.com/metrue/fx/bundler"
|
||||
)
|
||||
|
||||
// Php defines php bundler
|
||||
type Php struct {
|
||||
assets *packr.Box
|
||||
}
|
||||
|
||||
// New a koa bundler
|
||||
func New() *Php {
|
||||
return &Php{
|
||||
assets: packr.New("php", "./assets"),
|
||||
}
|
||||
}
|
||||
|
||||
// Scaffold a koa app
|
||||
func (k *Php) Scaffold(output string) error {
|
||||
return bundler.Restore(k.assets, output)
|
||||
}
|
||||
|
||||
// Bundle a function into a koa project
|
||||
func (k *Php) Bundle(output string, fn string, deps ...string) error {
|
||||
return bundler.Bundle(k.assets, output, "php", fn, deps...)
|
||||
}
|
||||
|
||||
var (
|
||||
_ bundler.Bundler = &Php{}
|
||||
)
|
||||
144
bundler/php/php_test.go
Normal file
144
bundler/php/php_test.go
Normal file
@@ -0,0 +1,144 @@
|
||||
package php
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/metrue/fx/utils"
|
||||
)
|
||||
|
||||
func TestPhpBundler(t *testing.T) {
|
||||
t.Run("Scaffold", func(t *testing.T) {
|
||||
outputDir, err := ioutil.TempDir("", "fx_php")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(outputDir)
|
||||
|
||||
php := New()
|
||||
if err := php.Scaffold(outputDir); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
diff, _, _, err := utils.Diff(outputDir, "./assets")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if diff {
|
||||
t.Fatalf("%s is not equal with %s", outputDir, "./assets")
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("BundleSingleFunc", func(t *testing.T) {
|
||||
fd, err := ioutil.TempFile("", "fx_func_*.php")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.Remove(fd.Name())
|
||||
|
||||
content := `<?php
|
||||
function Fx($a,$b) {
|
||||
return $a + $b;
|
||||
}
|
||||
`
|
||||
err = ioutil.WriteFile(fd.Name(), []byte(content), 0666)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
outputDir, err := ioutil.TempDir("", "fx_php")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(outputDir)
|
||||
|
||||
php := New()
|
||||
if err := php.Bundle(outputDir, fd.Name()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
diff, pre, cur, err := utils.Diff("./assets", outputDir)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if !diff {
|
||||
t.Fatalf("handle function should be changed: %s == %s", pre, cur)
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(cur, []byte(content)) {
|
||||
t.Fatalf("it should be %s but got %s", content, cur)
|
||||
}
|
||||
|
||||
preHandleFunc, err := ioutil.ReadFile("./assets/fx.php")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !reflect.DeepEqual(pre, preHandleFunc) {
|
||||
{
|
||||
}
|
||||
t.Fatalf("it should get %s but got %s", preHandleFunc, pre)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("BundleFuncAndDeps", func(t *testing.T) {
|
||||
fd, err := ioutil.TempFile("", "fx_func_*.js")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.Remove(fd.Name())
|
||||
|
||||
content, err := ioutil.ReadFile("./assets/fx.php")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
err = ioutil.WriteFile(fd.Name(), content, 0666)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
addFunc := `
|
||||
module.exports = (a, b) => a+b
|
||||
`
|
||||
addFd, err := ioutil.TempFile("", "fx_add_func_*.js")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
err = ioutil.WriteFile(addFd.Name(), []byte(addFunc), 0644)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
outputDir, err := ioutil.TempDir("", "fx_php")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(outputDir)
|
||||
|
||||
php := New()
|
||||
if err := php.Bundle(outputDir, fd.Name(), addFd.Name()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
diff, pre, cur, err := utils.Diff("./assets", outputDir)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if !diff {
|
||||
t.Fatalf("handle functino should be changed")
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(cur, []byte(addFunc)) {
|
||||
t.Fatalf("it should be %s but got %s", content, cur)
|
||||
}
|
||||
if pre != nil {
|
||||
t.Fatal(pre)
|
||||
}
|
||||
})
|
||||
}
|
||||
13
bundler/python/a_python-packr.go.tmpl
Normal file
13
bundler/python/a_python-packr.go.tmpl
Normal file
@@ -0,0 +1,13 @@
|
||||
// Code generated by github.com/gobuffalo/packr. DO NOT EDIT.
|
||||
|
||||
package python
|
||||
|
||||
import "github.com/gobuffalo/packr"
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
func init() {
|
||||
_ = packr.PackJSONBytes("python", "Dockerfile", "\"RlJPTSBtZXRydWUvZngtcHl0aG9uLWJhc2UKCkNPUFkgLiAuCkVYUE9TRSAzMDAwCkNNRCBmbGFzayBydW4gLWggMC4wLjAuMCAtcCAzMDAwCg==\"")
|
||||
_ = packr.PackJSONBytes("python", "app.py", "\"ZnJvbSBmeCBpbXBvcnQgZngKZnJvbSBmbGFzayBpbXBvcnQgRmxhc2ssIHJlcXVlc3QsIGpzb25pZnkKYXBwID0gRmxhc2soX19uYW1lX18pCgpAYXBwLnJvdXRlKCcvJywgbWV0aG9kcz1bJ1BPU1QnLCAnR0VUJ10pCmRlZiBoYW5kbGUoKToKICAgIHJldHVybiBmeChyZXF1ZXN0KQo=\"")
|
||||
_ = packr.PackJSONBytes("python", "fx.py", "\"ZGVmIGZ4KHJlcXVlc3QpOgogICAgcmV0dXJuICJoZWxsbyB3b3JsZCIK\"")
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// +build !skippackr
|
||||
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
package python
|
||||
|
||||
import _ "github.com/metrue/fx/packrd"
|
||||
13
bundler/ruby/a_ruby-packr.go.tmpl
Normal file
13
bundler/ruby/a_ruby-packr.go.tmpl
Normal file
@@ -0,0 +1,13 @@
|
||||
// Code generated by github.com/gobuffalo/packr. DO NOT EDIT.
|
||||
|
||||
package ruby
|
||||
|
||||
import "github.com/gobuffalo/packr"
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
func init() {
|
||||
_ = packr.PackJSONBytes("ruby", "Dockerfile", "\"RlJPTSBtZXRydWUvZngtcnVieS1iYXNlCgpDT1BZIC4gLgpFWFBPU0UgMzAwMApDTUQgcnVieSBhcHAucmIgLXAgMzAwMCAtbyAwLjAuMC4wCg==\"")
|
||||
_ = packr.PackJSONBytes("ruby", "app.rb", "\"cmVxdWlyZSAnc2luYXRyYScKcmVxdWlyZSAnanNvbicKCnJlcXVpcmVfcmVsYXRpdmUgJ2Z4LnJiJwoKc2V0IDpwb3J0LCAzMDAwCgpwb3N0ICcvJyBkbwogICAgY3R4ID0gewogICAgICA6cmVxdWVzdCA9PiByZXF1ZXN0LAogICAgICA6cmVzcG9uc2UgPT4gcmVzcG9uc2UsCiAgICAgIDpzdGF0dXMgPT4gc3RhdHVzLAogICAgICA6aGVhZGVycyA9PiBoZWFkZXJzLAogICAgfQogICAgZnggY3R4CmVuZAoKZ2V0ICcvJyBkbwogICAgY3R4ID0gewogICAgICA6cmVxdWVzdCA9PiByZXF1ZXN0LAogICAgICA6cmVzcG9uc2UgPT4gcmVzcG9uc2UsCiAgICAgIDpzdGF0dXMgPT4gc3RhdHVzLAogICAgICA6aGVhZGVycyA9PiBoZWFkZXJzLAogICAgfQogICAgZnggY3R4CmVuZAo=\"")
|
||||
_ = packr.PackJSONBytes("ruby", "fx.rb", "\"IwojIGN0eCA9IHsKIyAgIDpyZXF1ZXN0ID0+IHJlcXVlc3QsCiMgICA6cmVzcG9uc2UgPT4gcmVzcG9uc2UsCiMgICA6c3RhdHVzID0+IHN0YXR1cywKIyAgIDpoZWFkZXJzID0+IGhlYWRlcnMsCiMgfQpkZWYgZngoY3R4KQogIGN0eFs6cmVzcG9uc2VdLmJvZHkgPSAiaGVsbG8gd29ybGQiCmVuZAo=\"")
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// +build !skippackr
|
||||
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
package ruby
|
||||
|
||||
import _ "github.com/metrue/fx/packrd"
|
||||
17
bundler/rust/a_rust-packr.go.tmpl
Normal file
17
bundler/rust/a_rust-packr.go.tmpl
Normal file
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
||||
// +build !skippackr
|
||||
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
|
||||
|
||||
// You can use the "packr clean" command to clean up this,
|
||||
// and any other packr generated files.
|
||||
package rust
|
||||
|
||||
import _ "github.com/metrue/fx/packrd"
|
||||
@@ -16,6 +16,7 @@ var BaseImages = []string{
|
||||
"metrue/fx-node-base",
|
||||
"metrue/fx-d-base",
|
||||
"metrue/fx-go-base",
|
||||
"metrue/fx-crystal-base",
|
||||
}
|
||||
|
||||
// ConfigPath path to config
|
||||
|
||||
@@ -12,4 +12,5 @@ var ExtLangMapping = map[string]string{
|
||||
".d": "d",
|
||||
".rs": "rust",
|
||||
".pl": "perl",
|
||||
".cr": "crystal",
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
FROM crystallang/crystal:latest
|
||||
|
||||
WORKDIR /fx
|
||||
|
||||
COPY . /fx
|
||||
|
||||
RUN shards install
|
||||
@@ -0,0 +1,18 @@
|
||||
version: 2.0
|
||||
shards:
|
||||
exception_page:
|
||||
git: https://github.com/crystal-loot/exception_page.git
|
||||
version: 0.1.4
|
||||
|
||||
kemal:
|
||||
git: https://github.com/kemalcr/kemal.git
|
||||
version: 0.26.1
|
||||
|
||||
kilt:
|
||||
git: https://github.com/jeromegn/kilt.git
|
||||
version: 0.4.0
|
||||
|
||||
radix:
|
||||
git: https://github.com/luislavena/radix.git
|
||||
version: 0.3.9
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
name: fx-crystal-base
|
||||
version: 0.1.0
|
||||
dependencies:
|
||||
kemal:
|
||||
github: kemalcr/kemal
|
||||
commit: a819d4792bbc63d993d6dd2b15f9af5efb0c2d8c
|
||||
6
docs/fx_node.md
Normal file
6
docs/fx_node.md
Normal file
@@ -0,0 +1,6 @@
|
||||
fx support Observerity for Node/JavaScript function natively.
|
||||
|
||||
```
|
||||
ui: http://<host>:<port>/swagger-stats/ux
|
||||
promethus: http://<host>:<port>/swagger-stats/metrics
|
||||
```
|
||||
33
examples/functions/Crystal/README.md
vendored
Normal file
33
examples/functions/Crystal/README.md
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
# Make a Crystal function a service with fx
|
||||
|
||||
Write a function like,
|
||||
|
||||
```crystal
|
||||
def fx(ctx)
|
||||
"hello world, crystal"
|
||||
end
|
||||
```
|
||||
|
||||
then deploy it with `fx up` command,
|
||||
|
||||
```shell
|
||||
$ fx up -p 8000 func.cr
|
||||
```
|
||||
|
||||
test it using `curl`
|
||||
|
||||
```shell
|
||||
$ curl -i localhost:8000
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Connection: keep-alive
|
||||
X-Powered-By: Kemal
|
||||
Content-Type: text/html
|
||||
Content-Length: 20
|
||||
|
||||
hello world, crystal
|
||||
```
|
||||
|
||||
### ctx
|
||||
|
||||
The `ctx` argument is a Kemal HTTP request / response context [context](https://kemalcr.com/guide/#context)
|
||||
3
examples/functions/Crystal/func.cr
vendored
Normal file
3
examples/functions/Crystal/func.cr
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
def fx(ctx)
|
||||
"hello world, crystal"
|
||||
end
|
||||
48
examples/functions/demo/Makefile
vendored
Normal file
48
examples/functions/demo/Makefile
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
up:
|
||||
fx up -n ping.go.0 -p 12341 --force fx.go
|
||||
fx up -n ping.java.0 -p 12342 --force fx.java
|
||||
fx up -n ping.js.0 -p 12343 --force fx.js
|
||||
fx up -n ping.pl.0 -p 12344 --force fx.pl
|
||||
fx up -n ping.py.0 -p 12345 --force fx.py
|
||||
fx up -n ping.rb.0 -p 12346 --force fx.rb
|
||||
fx up -n ping.rs.0 -p 12347 --force fx.rs
|
||||
fx up -n ping.cr.0 -p 12348 --force fx.cr
|
||||
fx up -n ping.d.0 -p 12349 --force fx.d
|
||||
down:
|
||||
fx down ping.go.0
|
||||
fx down ping.java.0
|
||||
fx down ping.js.0
|
||||
fx down ping.pl.0
|
||||
fx down ping.py.0
|
||||
fx down ping.rb.0
|
||||
fx down ping.rs.0
|
||||
fx down ping.cr.0
|
||||
fx down ping.d.0
|
||||
l:
|
||||
fx list
|
||||
t:
|
||||
@curl 127.0.0.1:12341
|
||||
@echo ""
|
||||
@curl 127.0.0.1:12343
|
||||
@echo ""
|
||||
@curl 127.0.0.1:12344
|
||||
@echo ""
|
||||
@curl 127.0.0.1:12345
|
||||
@echo ""
|
||||
@curl 127.0.0.1:12346
|
||||
@echo ""
|
||||
@curl 127.0.0.1:12348
|
||||
@echo ""
|
||||
@curl 127.0.0.1:12349
|
||||
@echo ""
|
||||
@curl -X POST -H 'Content-Type: application/json' 127.0.0.1:12342 -d '{"a": 1, "b": 1 }'
|
||||
@echo ""
|
||||
@curl -X POST -H 'Content-Type: application/json' 127.0.0.1:12347 -d '{"a": 1, "b": 2 }'
|
||||
@echo ""
|
||||
@curl -X POST -H 'Content-Type: application/json' 127.0.0.1:12349 -d '{"a": 1, "b": 3 }'
|
||||
@echo ""
|
||||
b:
|
||||
ab -n 10000 -c 10 http://127.0.0.1:12343/
|
||||
m:
|
||||
open http://127.0.0.1:12343/swagger-stats/ux
|
||||
open http://127.0.0.1:12343/swagger-stats/metrics
|
||||
63
examples/functions/demo/demo.cast
vendored
Normal file
63
examples/functions/demo/demo.cast
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
{"version": 2, "width": 204, "height": 64, "timestamp": 1602561588, "env": {"SHELL": "/bin/zsh", "TERM": "xterm-256color"}}
|
||||
[1.881844, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r\u001b]2;minhuang@FVFXG11WHV2J: ~/projects/fx/examples/functions/demo\u0007\u001b]1;..unctions/demo\u0007"]
|
||||
[2.04323, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[01;32m➜ \u001b[36mdemo\u001b[00m \u001b[01;34mgit:(\u001b[31mdemo\u001b[34m) \u001b[33m✗\u001b[00m "]
|
||||
[2.043443, "o", "\u001b[K"]
|
||||
[2.043636, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
|
||||
[2.85694, "o", "f"]
|
||||
[3.022723, "o", "\bfg"]
|
||||
[3.167563, "o", "\u001b[?1l\u001b>"]
|
||||
[3.167764, "o", "\u001b[?2004l\r\r\n"]
|
||||
[3.16933, "o", "\u001b]2;fg\u0007\u001b]1;fg\u0007"]
|
||||
[3.169498, "o", "fg: no current job\r\n\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r"]
|
||||
[3.169535, "o", "\u001b]2;minhuang@FVFXG11WHV2J: ~/projects/fx/examples/functions/demo\u0007"]
|
||||
[3.169994, "o", "\u001b]1;..unctions/demo\u0007"]
|
||||
[3.326735, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[01;31m➜ \u001b[36mdemo\u001b[00m \u001b[01;34mgit:(\u001b[31mdemo\u001b[34m) \u001b[33m✗\u001b[00m \u001b[K"]
|
||||
[3.326893, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
|
||||
[4.239502, "o", "v"]
|
||||
[4.355434, "o", "\bvi"]
|
||||
[5.162926, "o", "\b\bv \b"]
|
||||
[5.314817, "o", "\b \b"]
|
||||
[5.601643, "o", "f"]
|
||||
[5.69716, "o", "\bfg"]
|
||||
[5.833094, "o", "\u001b[?1l\u001b>"]
|
||||
[5.833277, "o", "\u001b[?2004l\r\r\n"]
|
||||
[5.833948, "o", "\u001b]2;fg\u0007\u001b]1;fg\u0007"]
|
||||
[5.834301, "o", "fg: no current job\r\n\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r\u001b]2;minhuang@FVFXG11WHV2J: ~/projects/fx/examples/functions/demo\u0007\u001b]1;..unctions/demo\u0007"]
|
||||
[5.957947, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[01;31m➜ \u001b[36mdemo\u001b[00m \u001b[01;34mgit:(\u001b[31mdemo\u001b[34m) \u001b[33m✗\u001b[00m \u001b[K"]
|
||||
[5.958194, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
|
||||
[6.547304, "o", "f"]
|
||||
[6.707392, "o", "\bfg"]
|
||||
[6.8212, "o", "\u001b[?1l\u001b>"]
|
||||
[6.821279, "o", "\u001b[?2004l"]
|
||||
[6.82149, "o", "\r\r\n"]
|
||||
[6.822082, "o", "\u001b]2;fg\u0007\u001b]1;fg\u0007"]
|
||||
[6.82219, "o", "fg: no current job\r\n"]
|
||||
[6.822268, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r"]
|
||||
[6.82273, "o", "\u001b]2;minhuang@FVFXG11WHV2J: ~/projects/fx/examples/functions/demo\u0007\u001b]1;..unctions/demo\u0007"]
|
||||
[6.963467, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[01;31m➜ \u001b[36mdemo\u001b[00m \u001b[01;34mgit:(\u001b[31mdemo\u001b[34m) \u001b[33m✗\u001b[00m \u001b[K"]
|
||||
[6.963641, "o", "\u001b[?1h\u001b="]
|
||||
[6.963776, "o", "\u001b[?2004h"]
|
||||
[13.288488, "o", "f"]
|
||||
[13.364954, "o", "\bfg"]
|
||||
[13.511865, "o", "\u001b[?1l\u001b>"]
|
||||
[13.512049, "o", "\u001b[?2004l\r\r\n"]
|
||||
[13.512809, "o", "\u001b]2;fg\u0007\u001b]1;fg\u0007"]
|
||||
[13.513361, "o", "fg: no current job\r\n\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r\u001b]2;minhuang@FVFXG11WHV2J: ~/projects/fx/examples/functions/demo\u0007\u001b]1;..unctions/demo\u0007"]
|
||||
[13.745801, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[01;31m➜ \u001b[36mdemo\u001b[00m \u001b[01;34mgit:(\u001b[31mdemo\u001b[34m) \u001b[33m✗\u001b[00m \u001b[K"]
|
||||
[13.746011, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
|
||||
[13.969195, "o", "f"]
|
||||
[14.102194, "o", "\bfg"]
|
||||
[14.236118, "o", "\u001b[?1l\u001b>"]
|
||||
[14.236332, "o", "\u001b[?2004l\r\r\n"]
|
||||
[14.237195, "o", "\u001b]2;fg\u0007\u001b]1;fg\u0007"]
|
||||
[14.237358, "o", "fg: no current job\r\n\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r"]
|
||||
[14.237948, "o", "\u001b]2;minhuang@FVFXG11WHV2J: ~/projects/fx/examples/functions/demo\u0007\u001b]1;..unctions/demo\u0007"]
|
||||
[14.410771, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[01;31m➜ \u001b[36mdemo\u001b[00m \u001b[01;34mgit:(\u001b[31mdemo\u001b[34m) \u001b[33m✗\u001b[00m \u001b[K"]
|
||||
[14.410938, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
|
||||
[14.812678, "o", "e"]
|
||||
[15.058809, "o", "\bex"]
|
||||
[15.147778, "o", "i"]
|
||||
[15.356224, "o", "t"]
|
||||
[15.604192, "o", "\u001b[?1l\u001b>"]
|
||||
[15.604361, "o", "\u001b[?2004l\r\r\n"]
|
||||
[15.606869, "o", "\u001b]2;exit\u0007\u001b]1;exit\u0007"]
|
||||
3
examples/functions/demo/fx.cr
vendored
Normal file
3
examples/functions/demo/fx.cr
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
def fx(ctx)
|
||||
"hello world, crystal"
|
||||
end
|
||||
6
examples/functions/demo/fx.d
vendored
Normal file
6
examples/functions/demo/fx.d
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import std.json;
|
||||
|
||||
long executeFx(JSONValue input)
|
||||
{
|
||||
return input["a"].integer + input["b"].integer;
|
||||
}
|
||||
9
examples/functions/demo/fx.go
vendored
Normal file
9
examples/functions/demo/fx.go
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
package main
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
|
||||
func fx(ctx *gin.Context) {
|
||||
ctx.JSON(200, gin.H{
|
||||
"message": "hello world, Go",
|
||||
})
|
||||
}
|
||||
11
examples/functions/demo/fx.java
vendored
Normal file
11
examples/functions/demo/fx.java
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
package fx;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class Fx {
|
||||
public int handle(JSONObject input) {
|
||||
String a = input.get("a").toString();
|
||||
String b = input.get("b").toString();
|
||||
return Integer.parseInt(a) + Integer.parseInt(b);
|
||||
}
|
||||
}
|
||||
8
examples/functions/demo/fx.jl
vendored
Normal file
8
examples/functions/demo/fx.jl
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
struct Input
|
||||
a::Number
|
||||
b::Number
|
||||
end
|
||||
|
||||
fx = function(input::Input)
|
||||
return input.a + input.b
|
||||
end
|
||||
3
examples/functions/demo/fx.js
vendored
Normal file
3
examples/functions/demo/fx.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = (ctx) => {
|
||||
ctx.body = 'hello world, JavaScript'
|
||||
}
|
||||
5
examples/functions/demo/fx.pl
vendored
Normal file
5
examples/functions/demo/fx.pl
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
sub fx {
|
||||
return 'hello world, Perl'
|
||||
}
|
||||
|
||||
1;
|
||||
2
examples/functions/demo/fx.py
vendored
Normal file
2
examples/functions/demo/fx.py
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
def fx(request):
|
||||
return "hello world, Python"
|
||||
3
examples/functions/demo/fx.rb
vendored
Normal file
3
examples/functions/demo/fx.rb
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
def fx(ctx)
|
||||
ctx[:response].body = "hello world, Ruby"
|
||||
end
|
||||
18
examples/functions/demo/fx.rs
vendored
Normal file
18
examples/functions/demo/fx.rs
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
pub mod fns {
|
||||
#[derive(Serialize)]
|
||||
pub struct Response {
|
||||
pub result: i32,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct Request {
|
||||
pub a: i32,
|
||||
pub b: i32,
|
||||
}
|
||||
|
||||
pub fn func(req: Request) -> Response {
|
||||
Response {
|
||||
result: req.a + req.b,
|
||||
}
|
||||
}
|
||||
}
|
||||
2
fx.go
2
fx.go
@@ -19,7 +19,7 @@ import (
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
|
||||
)
|
||||
|
||||
const version = "0.9.45"
|
||||
const version = "0.9.46"
|
||||
|
||||
func init() {
|
||||
go checkForUpdate()
|
||||
|
||||
18
go.mod
18
go.mod
@@ -5,7 +5,7 @@ go 1.12
|
||||
require (
|
||||
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
|
||||
github.com/Microsoft/go-winio v0.4.14 // indirect
|
||||
github.com/apex/log v1.6.0
|
||||
github.com/apex/log v1.8.0
|
||||
github.com/cheggaaa/pb/v3 v3.0.5
|
||||
github.com/docker/distribution v2.7.1+incompatible // indirect
|
||||
github.com/docker/docker v0.0.0-20190313072916-46036c230805
|
||||
@@ -13,15 +13,20 @@ require (
|
||||
github.com/docker/go-units v0.3.3 // indirect
|
||||
github.com/dsnet/compress v0.0.1 // indirect
|
||||
github.com/gin-gonic/gin v1.6.3
|
||||
github.com/gobuffalo/envy v1.9.0 // indirect
|
||||
github.com/gobuffalo/packd v1.0.0
|
||||
github.com/gobuffalo/packr v1.30.1 // indirect
|
||||
github.com/gobuffalo/packr/v2 v2.8.0
|
||||
github.com/golang/mock v1.4.4
|
||||
github.com/golang/protobuf v1.3.3
|
||||
github.com/golang/snappy v0.0.1 // indirect
|
||||
github.com/google/go-querystring v1.0.0
|
||||
github.com/google/uuid v1.1.1
|
||||
github.com/google/uuid v1.1.2
|
||||
github.com/googleapis/gnostic v0.3.1 // indirect
|
||||
github.com/gorilla/mux v1.7.3 // indirect
|
||||
github.com/imdario/mergo v0.3.7 // indirect
|
||||
github.com/karrick/godirwalk v1.16.1 // indirect
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
|
||||
github.com/logrusorgru/aurora v0.0.0-20191017060258-dc85c304c434
|
||||
github.com/metrue/go-ssh-client v0.0.0-20200317072149-19d54050aefd
|
||||
github.com/mholt/archiver v3.1.1+incompatible
|
||||
@@ -35,11 +40,18 @@ require (
|
||||
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
|
||||
github.com/pierrec/lz4 v0.0.0-20190222153722-062282ea0dcf // indirect
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/rogpeppe/go-internal v1.6.2 // indirect
|
||||
github.com/sirupsen/logrus v1.7.0 // indirect
|
||||
github.com/spf13/cobra v1.0.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/stretchr/testify v1.6.1
|
||||
github.com/urfave/cli v1.22.4
|
||||
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
|
||||
golang.org/x/crypto v0.0.0-20191219195013-becbf705a915 // indirect
|
||||
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee // indirect
|
||||
golang.org/x/sync v0.0.0-20201008141435-b3e1573b7520 // indirect
|
||||
golang.org/x/sys v0.0.0-20201013064817-56aa3af1a10a // indirect
|
||||
golang.org/x/tools v0.0.0-20201013053347-2db1cd791039 // indirect
|
||||
google.golang.org/grpc v1.21.0
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gotest.tools v2.2.0+incompatible // indirect
|
||||
k8s.io/api v0.0.0-20190925180651-d58b53da08f5
|
||||
|
||||
89
go.sum
89
go.sum
@@ -23,13 +23,8 @@ github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdc
|
||||
github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/apex/log v1.1.4 h1:3Zk+boorIQAAGBrHn0JUtAau4ihMamT4WdnfdnXM1zQ=
|
||||
github.com/apex/log v1.1.4/go.mod h1:AlpoD9aScyQfJDVHmLMEcx4oU6LqzkWp4Mg9GdAcEvQ=
|
||||
github.com/apex/log v1.3.0 h1:1fyfbPvUwD10nMoh3hY6MXzvZShJQn9/ck7ATgAt5pA=
|
||||
github.com/apex/log v1.3.0/go.mod h1:jd8Vpsr46WAe3EZSQ/IUMs2qQD/GOycT5rPWCO1yGcs=
|
||||
github.com/apex/log v1.6.0 h1:Y50wF1PBIIexIgTm0/7G6gcLitkO5jHK5Mb6wcMY0UI=
|
||||
github.com/apex/log v1.6.0/go.mod h1:x7s+P9VtvFBXge9Vbn+8TrqKmuzmD35TTkeBHul8UtY=
|
||||
github.com/apex/logs v0.0.4/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo=
|
||||
github.com/apex/log v1.8.0 h1:+W4j+dttibFvynPLlctdnYFUn1eLKT37BZWWW2iMfEM=
|
||||
github.com/apex/log v1.8.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA=
|
||||
github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo=
|
||||
github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE=
|
||||
github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys=
|
||||
@@ -39,16 +34,17 @@ github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/cheggaaa/pb/v3 v3.0.4 h1:QZEPYOj2ix6d5oEg63fbHmpolrnNiwjUsk+h74Yt4bM=
|
||||
github.com/cheggaaa/pb/v3 v3.0.4/go.mod h1:7rgWxLrAUcFMkvJuv09+DYi7mMUYi8nO9iOWcvGJPfw=
|
||||
github.com/cheggaaa/pb/v3 v3.0.5 h1:lmZOti7CraK9RSjzExsY53+WWfub9Qv13B5m4ptEoPE=
|
||||
github.com/cheggaaa/pb/v3 v3.0.5/go.mod h1:X1L61/+36nz9bjIsrDU52qHKOQukUQe2Ge+YvGuquCw=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
|
||||
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
|
||||
@@ -103,10 +99,19 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+
|
||||
github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY=
|
||||
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/gobuffalo/envy v1.7.0 h1:GlXgaiBkmrYMHco6t4j7SacKO4XUjvh5pwXh0f4uxXU=
|
||||
github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI=
|
||||
github.com/gobuffalo/envy v1.9.0 h1:eZR0DuEgVLfeIb1zIKt3bT4YovIMf9O9LXQeCZLXpqE=
|
||||
github.com/gobuffalo/envy v1.9.0/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w=
|
||||
github.com/gobuffalo/logger v1.0.0/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs=
|
||||
github.com/gobuffalo/logger v1.0.3 h1:YaXOTHNPCvkqqA7w05A4v0k2tCdpr+sgFlgINbQ6gqc=
|
||||
github.com/gobuffalo/logger v1.0.3/go.mod h1:SoeejUwldiS7ZsyCBphOGURmWdwUFXs0J7TCjEhjKxM=
|
||||
github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q=
|
||||
github.com/gobuffalo/packd v1.0.0 h1:6ERZvJHfe24rfFmA9OaoKBdC7+c9sydrytMg8SdFGBM=
|
||||
github.com/gobuffalo/packd v1.0.0/go.mod h1:6VTc4htmJRFB7u1m/4LeMTWjFoYrUiBkU9Fdec9hrhI=
|
||||
github.com/gobuffalo/packr v1.30.1 h1:hu1fuVR3fXEZR7rXNW3h8rqSML8EVAf6KNm0NKO/wKg=
|
||||
github.com/gobuffalo/packr v1.30.1/go.mod h1:ljMyFO2EcrnzsHsN99cvbq055Y9OhRrIaviy289eRuk=
|
||||
github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWSVlXRN9X1Iw=
|
||||
github.com/gobuffalo/packr/v2 v2.8.0 h1:IULGd15bQL59ijXLxEvA5wlMxsmx/ZkQv9T282zNVIY=
|
||||
github.com/gobuffalo/packr/v2 v2.8.0/go.mod h1:PDk2k3vGevNE3SwVyVRgQCCXETC9SaONCNSXT1Q8M1g=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
@@ -121,8 +126,6 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb
|
||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.3.1 h1:qGJ6qTW+x6xX/my+8YUVl4WNpX9B7+/l2tRsHGZ7f2s=
|
||||
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
||||
github.com/golang/mock v1.4.3 h1:GV+pQPG/EUUbkh47niozDcADz6go/dUwhVzdUQHIVRw=
|
||||
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc=
|
||||
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||
github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
@@ -148,6 +151,8 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
|
||||
github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk=
|
||||
@@ -171,6 +176,8 @@ github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ
|
||||
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
|
||||
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
|
||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0=
|
||||
github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
@@ -180,8 +187,11 @@ github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGn
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
|
||||
github.com/karrick/godirwalk v1.15.3 h1:0a2pXOgtB16CqIqXTiT7+K9L73f74n/aNQUnH6Ortew=
|
||||
github.com/karrick/godirwalk v1.15.3/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk=
|
||||
github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA9iw=
|
||||
github.com/karrick/godirwalk v1.16.1/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk=
|
||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
@@ -190,9 +200,11 @@ github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgo
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
|
||||
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
@@ -216,7 +228,6 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc
|
||||
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
|
||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54=
|
||||
@@ -257,8 +268,6 @@ github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2i
|
||||
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
|
||||
github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI=
|
||||
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
|
||||
github.com/otiai10/copy v1.1.1 h1:PH7IFlRQ6Fv9vYmuXbDRLdgTHoP1w483kPNUP2bskpo=
|
||||
github.com/otiai10/copy v1.1.1/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
|
||||
github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k=
|
||||
github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
|
||||
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95 h1:+OLn68pqasWca0z5ryit9KGfp3sUsW4Lqg32iRMJyzs=
|
||||
@@ -296,8 +305,15 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7z
|
||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||
github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||
github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/rogpeppe/go-internal v1.5.2 h1:qLvObTrvO/XRCqmkKxUlOBc48bI3efyDuAZe25QiF0w=
|
||||
github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/rogpeppe/go-internal v1.6.2 h1:aIihoIOHCiLZHxyoNQ+ABL4NKhFTgKLBdMLyEAh98m0=
|
||||
github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
|
||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
@@ -307,6 +323,8 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
|
||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
||||
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM=
|
||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/smartystreets/assertions v1.0.0 h1:UVQPSSmc3qtTi+zPPkCXvZX9VvW/xT/NsRvKfwY81a8=
|
||||
github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=
|
||||
github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM=
|
||||
@@ -318,7 +336,11 @@ github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=
|
||||
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
|
||||
github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
|
||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
|
||||
github.com/spf13/cobra v0.0.6 h1:breEStsVwemnKh2/s6gMvSdMEkwW0sK8vGStnlVBMCs=
|
||||
github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
|
||||
github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8=
|
||||
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
|
||||
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
|
||||
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
||||
github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
@@ -326,6 +348,7 @@ github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
|
||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
|
||||
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
|
||||
@@ -338,13 +361,12 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho=
|
||||
github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0=
|
||||
github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk=
|
||||
github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk=
|
||||
github.com/tj/go-buffer v1.0.1/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj52Uc=
|
||||
github.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj52Uc=
|
||||
github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0=
|
||||
github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao=
|
||||
github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4=
|
||||
@@ -352,6 +374,7 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1
|
||||
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
|
||||
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
|
||||
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
|
||||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
||||
github.com/ulikunitz/xz v0.5.6 h1:jGHAfXawEGZQ3blwU5wnWKQJvAraT7Ftq9EXjnXYgt8=
|
||||
@@ -362,28 +385,35 @@ github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofm
|
||||
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc=
|
||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191122220453-ac88ee75c92c/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20191219195013-becbf705a915 h1:aJ0ex187qoXrJHPo8ZasVTASQB7llQP6YeNzgDALPRk=
|
||||
golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee h1:4yd7jl+vXjalO5ztz6Vc1VADv+S/80LGJmyl1ROJ2AI=
|
||||
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@@ -401,6 +431,8 @@ golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc h1:gkKoSkUmnU6bpS/VhkuO27bzQ
|
||||
golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
@@ -414,25 +446,31 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEha
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201008141435-b3e1573b7520 h1:Bx6FllMpG4NWDOfhMBz1VR2QYNp/SAOHPIAsaVmxfPo=
|
||||
golang.org/x/sync v0.0.0-20201008141435-b3e1573b7520/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201013064817-56aa3af1a10a h1:C94gX3MFMbsttNp4Yu1rqIGdMRht3/kkffDC0QvBw0s=
|
||||
golang.org/x/sys v0.0.0-20201013064817-56aa3af1a10a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||
@@ -449,11 +487,16 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200308013534-11ec41452d41 h1:9Di9iYgOt9ThCipBxChBVhgNipDoE5mxO84rQV7D0FE=
|
||||
golang.org/x/tools v0.0.0-20200308013534-11ec41452d41/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
||||
golang.org/x/tools v0.0.0-20201013053347-2db1cd791039 h1:kLBxO4OPBgPwjg8Vvu+/0DCHIfDwYIGNFcD66NU9kpo=
|
||||
golang.org/x/tools v0.0.0-20201013053347-2db1cd791039/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
@@ -470,6 +513,7 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
@@ -487,6 +531,7 @@ gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c h1:grhR+C34yXImVGp7EzNk+DTIk+323eIUWOmEevy6bDo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
|
||||
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
||||
@@ -509,10 +554,6 @@ k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKf
|
||||
k8s.io/utils v0.0.0-20190920012459-5008bf6f8cd6/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
|
||||
k8s.io/utils v0.0.0-20190923111123-69764acb6e8e h1:BXSmdH6S3YGLlhC89DZp+sNdYSmwNeDU6Xu5ZpzGOlM=
|
||||
k8s.io/utils v0.0.0-20190923111123-69764acb6e8e/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
|
||||
rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
|
||||
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
|
||||
@@ -17,6 +17,7 @@ var ExtLangMapping = map[string]string{
|
||||
".d": "d",
|
||||
".rs": "rust",
|
||||
".pl": "perl",
|
||||
".cr": "crystal",
|
||||
}
|
||||
|
||||
func langFromFileName(fileName string) (string, error) {
|
||||
|
||||
@@ -47,6 +47,10 @@ func TestLangFromFileName(t *testing.T) {
|
||||
name: "a.pl",
|
||||
lang: "perl",
|
||||
},
|
||||
{
|
||||
name: "a.cr",
|
||||
lang: "crystal",
|
||||
},
|
||||
}
|
||||
|
||||
for _, c := range cases {
|
||||
|
||||
File diff suppressed because one or more lines are too long
3
test/functions/func.cr
Normal file
3
test/functions/func.cr
Normal file
@@ -0,0 +1,3 @@
|
||||
def fx(ctx)
|
||||
"hello world"
|
||||
end
|
||||
@@ -265,6 +265,7 @@ func GetLangFromFileName(fileName string) (lang string) {
|
||||
".java": "java",
|
||||
".d": "d",
|
||||
".rs": "rust",
|
||||
".cr": "crystal",
|
||||
}
|
||||
return extLangMap[filepath.Ext(fileName)]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user