From 822ef823e9d619ba5223516a205223f7aab7e7c2 Mon Sep 17 00:00:00 2001
From: xdrm-brackets
Date: Sun, 20 Jun 2021 21:29:46 +0200
Subject: [PATCH 1/3] migrate: symbols import paths to github
---
README.md | 19 +++++++++++--------
api/context.go | 2 +-
builder.go | 6 +++---
builder_test.go | 4 ++--
datatype/builtin/any.go | 2 +-
datatype/builtin/any_test.go | 2 +-
datatype/builtin/bool.go | 2 +-
datatype/builtin/bool_test.go | 2 +-
datatype/builtin/float.go | 2 +-
datatype/builtin/float_test.go | 2 +-
datatype/builtin/int.go | 2 +-
datatype/builtin/int_test.go | 2 +-
datatype/builtin/string.go | 2 +-
datatype/builtin/string_test.go | 2 +-
datatype/builtin/uint.go | 2 +-
datatype/builtin/uint_test.go | 2 +-
go.mod | 2 +-
handler.go | 8 ++++----
handler_test.go | 6 +++---
internal/config/config.go | 2 +-
internal/config/config_test.go | 2 +-
internal/config/parameter.go | 2 +-
internal/config/service.go | 2 +-
internal/dynfunc/handler.go | 4 ++--
internal/dynfunc/handler_test.go | 2 +-
internal/dynfunc/signature.go | 4 ++--
internal/dynfunc/signature_test.go | 2 +-
internal/reqdata/set.go | 4 ++--
internal/reqdata/set_test.go | 2 +-
29 files changed, 50 insertions(+), 47 deletions(-)
diff --git a/README.md b/README.md
index 543ff65..9a6318c 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-
-
+
+
@@ -10,7 +10,10 @@
Fast, intuitive, and powerful configuration-driven engine for faster and easier REST development.
-[![Go version](https://img.shields.io/badge/go_version-1.16-blue.svg)](https://golang.org/doc/go1.16) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Go Report Card](https://goreportcard.com/badge/git.xdrm.io/go/aicra)](https://goreportcard.com/report/git.xdrm.io/go/aicra) [![Go doc](https://godoc.org/git.xdrm.io/go/aicra?status.svg)](https://godoc.org/git.xdrm.io/go/aicra) [![Build Status](https://drone.xdrm.io/api/badges/go/aicra/status.svg)](https://drone.xdrm.io/go/aicra)
+[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
+[![Go version](https://img.shields.io/badge/go_version-1.16-blue.svg)](https://golang.org/doc/go1.16)
+[![Go doc](https://pkg.go.dev/badge/github.com/xdrm-io/aicra)](https://pkg.go.dev/github.com/xdrm-io/aicra)
+[![Go Report Card](https://goreportcard.com/badge/github.com/xdrm-io/aicra)](https://goreportcard.com/report/github.com/xdrm-io/aicra)
## Presentation
@@ -43,11 +46,11 @@ To install the aicra package, you need to install Go and set your Go workspace f
1. you can use the below Go command to install aicra.
```bash
-$ go get -u git.xdrm.io/go/aicra
+$ go get -u github.com/xdrm-io/aicra
```
2. Import it in your code:
```go
-import "git.xdrm.io/go/aicra"
+import "github.com/xdrm-io/aicra"
```
## What's automated
@@ -83,9 +86,9 @@ import (
"net/http"
"os"
- "git.xdrm.io/go/aicra"
- "git.xdrm.io/go/aicra/api"
- "git.xdrm.io/go/aicra/datatype/builtin"
+ "github.com/xdrm-io/aicra"
+ "github.com/xdrm-io/aicra/api"
+ "github.com/xdrm-io/aicra/datatype/builtin"
)
func main() {
diff --git a/api/context.go b/api/context.go
index a384282..97af658 100644
--- a/api/context.go
+++ b/api/context.go
@@ -4,7 +4,7 @@ import (
"context"
"net/http"
- "git.xdrm.io/go/aicra/internal/ctx"
+ "github.com/xdrm-io/aicra/internal/ctx"
)
// GetRequest extracts the current request from a context.Context
diff --git a/builder.go b/builder.go
index d3c9eb9..0fc8d3b 100644
--- a/builder.go
+++ b/builder.go
@@ -5,9 +5,9 @@ import (
"io"
"net/http"
- "git.xdrm.io/go/aicra/datatype"
- "git.xdrm.io/go/aicra/internal/config"
- "git.xdrm.io/go/aicra/internal/dynfunc"
+ "github.com/xdrm-io/aicra/datatype"
+ "github.com/xdrm-io/aicra/internal/config"
+ "github.com/xdrm-io/aicra/internal/dynfunc"
)
// Builder for an aicra server
diff --git a/builder_test.go b/builder_test.go
index 0207c1e..8bae2ac 100644
--- a/builder_test.go
+++ b/builder_test.go
@@ -7,8 +7,8 @@ import (
"strings"
"testing"
- "git.xdrm.io/go/aicra/api"
- "git.xdrm.io/go/aicra/datatype/builtin"
+ "github.com/xdrm-io/aicra/api"
+ "github.com/xdrm-io/aicra/datatype/builtin"
)
func addBuiltinTypes(b *Builder) error {
diff --git a/datatype/builtin/any.go b/datatype/builtin/any.go
index e1139b0..fdfd5f9 100644
--- a/datatype/builtin/any.go
+++ b/datatype/builtin/any.go
@@ -3,7 +3,7 @@ package builtin
import (
"reflect"
- "git.xdrm.io/go/aicra/datatype"
+ "github.com/xdrm-io/aicra/datatype"
)
// AnyDataType is what its name tells
diff --git a/datatype/builtin/any_test.go b/datatype/builtin/any_test.go
index c06b3cf..8d9ae03 100644
--- a/datatype/builtin/any_test.go
+++ b/datatype/builtin/any_test.go
@@ -4,7 +4,7 @@ import (
"fmt"
"testing"
- "git.xdrm.io/go/aicra/datatype/builtin"
+ "github.com/xdrm-io/aicra/datatype/builtin"
)
func TestAny_AvailableTypes(t *testing.T) {
diff --git a/datatype/builtin/bool.go b/datatype/builtin/bool.go
index 4d95547..720c59d 100644
--- a/datatype/builtin/bool.go
+++ b/datatype/builtin/bool.go
@@ -3,7 +3,7 @@ package builtin
import (
"reflect"
- "git.xdrm.io/go/aicra/datatype"
+ "github.com/xdrm-io/aicra/datatype"
)
// BoolDataType is what its name tells
diff --git a/datatype/builtin/bool_test.go b/datatype/builtin/bool_test.go
index e7051c4..c44b262 100644
--- a/datatype/builtin/bool_test.go
+++ b/datatype/builtin/bool_test.go
@@ -4,7 +4,7 @@ import (
"fmt"
"testing"
- "git.xdrm.io/go/aicra/datatype/builtin"
+ "github.com/xdrm-io/aicra/datatype/builtin"
)
func TestBool_AvailableTypes(t *testing.T) {
diff --git a/datatype/builtin/float.go b/datatype/builtin/float.go
index 5016f10..6bb39f9 100644
--- a/datatype/builtin/float.go
+++ b/datatype/builtin/float.go
@@ -4,7 +4,7 @@ import (
"encoding/json"
"reflect"
- "git.xdrm.io/go/aicra/datatype"
+ "github.com/xdrm-io/aicra/datatype"
)
// FloatDataType is what its name tells
diff --git a/datatype/builtin/float_test.go b/datatype/builtin/float_test.go
index 4d692b6..193dd7c 100644
--- a/datatype/builtin/float_test.go
+++ b/datatype/builtin/float_test.go
@@ -5,7 +5,7 @@ import (
"math"
"testing"
- "git.xdrm.io/go/aicra/datatype/builtin"
+ "github.com/xdrm-io/aicra/datatype/builtin"
)
func TestFloat64_AvailableTypes(t *testing.T) {
diff --git a/datatype/builtin/int.go b/datatype/builtin/int.go
index 36b1038..b1473a6 100644
--- a/datatype/builtin/int.go
+++ b/datatype/builtin/int.go
@@ -5,7 +5,7 @@ import (
"math"
"reflect"
- "git.xdrm.io/go/aicra/datatype"
+ "github.com/xdrm-io/aicra/datatype"
)
// IntDataType is what its name tells
diff --git a/datatype/builtin/int_test.go b/datatype/builtin/int_test.go
index 01837cc..8b7a157 100644
--- a/datatype/builtin/int_test.go
+++ b/datatype/builtin/int_test.go
@@ -5,7 +5,7 @@ import (
"math"
"testing"
- "git.xdrm.io/go/aicra/datatype/builtin"
+ "github.com/xdrm-io/aicra/datatype/builtin"
)
func TestInt_AvailableTypes(t *testing.T) {
diff --git a/datatype/builtin/string.go b/datatype/builtin/string.go
index 02be6ae..902daf7 100644
--- a/datatype/builtin/string.go
+++ b/datatype/builtin/string.go
@@ -5,7 +5,7 @@ import (
"regexp"
"strconv"
- "git.xdrm.io/go/aicra/datatype"
+ "github.com/xdrm-io/aicra/datatype"
)
var fixedLengthRegex = regexp.MustCompile(`^string\((\d+)\)$`)
diff --git a/datatype/builtin/string_test.go b/datatype/builtin/string_test.go
index cb51216..4441525 100644
--- a/datatype/builtin/string_test.go
+++ b/datatype/builtin/string_test.go
@@ -4,7 +4,7 @@ import (
"fmt"
"testing"
- "git.xdrm.io/go/aicra/datatype/builtin"
+ "github.com/xdrm-io/aicra/datatype/builtin"
)
func TestString_AvailableTypes(t *testing.T) {
diff --git a/datatype/builtin/uint.go b/datatype/builtin/uint.go
index e59d2c1..990d15b 100644
--- a/datatype/builtin/uint.go
+++ b/datatype/builtin/uint.go
@@ -5,7 +5,7 @@ import (
"math"
"reflect"
- "git.xdrm.io/go/aicra/datatype"
+ "github.com/xdrm-io/aicra/datatype"
)
// UintDataType is what its name tells
diff --git a/datatype/builtin/uint_test.go b/datatype/builtin/uint_test.go
index 55686cc..6175321 100644
--- a/datatype/builtin/uint_test.go
+++ b/datatype/builtin/uint_test.go
@@ -5,7 +5,7 @@ import (
"math"
"testing"
- "git.xdrm.io/go/aicra/datatype/builtin"
+ "github.com/xdrm-io/aicra/datatype/builtin"
)
func TestUint_AvailableTypes(t *testing.T) {
diff --git a/go.mod b/go.mod
index b0184f9..dd080b7 100644
--- a/go.mod
+++ b/go.mod
@@ -1,3 +1,3 @@
-module git.xdrm.io/go/aicra
+module github.com/xdrm-io/aicra
go 1.16
diff --git a/handler.go b/handler.go
index 4dea77a..de3c151 100644
--- a/handler.go
+++ b/handler.go
@@ -6,10 +6,10 @@ import (
"net/http"
"strings"
- "git.xdrm.io/go/aicra/api"
- "git.xdrm.io/go/aicra/internal/config"
- "git.xdrm.io/go/aicra/internal/ctx"
- "git.xdrm.io/go/aicra/internal/reqdata"
+ "github.com/xdrm-io/aicra/api"
+ "github.com/xdrm-io/aicra/internal/config"
+ "github.com/xdrm-io/aicra/internal/ctx"
+ "github.com/xdrm-io/aicra/internal/reqdata"
)
// Handler wraps the builder to handle requests
diff --git a/handler_test.go b/handler_test.go
index c5883c5..00311f1 100644
--- a/handler_test.go
+++ b/handler_test.go
@@ -10,9 +10,9 @@ import (
"strings"
"testing"
- "git.xdrm.io/go/aicra"
- "git.xdrm.io/go/aicra/api"
- "git.xdrm.io/go/aicra/datatype/builtin"
+ "github.com/xdrm-io/aicra"
+ "github.com/xdrm-io/aicra/api"
+ "github.com/xdrm-io/aicra/datatype/builtin"
)
func addBuiltinTypes(b *aicra.Builder) error {
diff --git a/internal/config/config.go b/internal/config/config.go
index bfda9df..1ac6fcc 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -7,7 +7,7 @@ import (
"net/http"
"strings"
- "git.xdrm.io/go/aicra/datatype"
+ "github.com/xdrm-io/aicra/datatype"
)
// Server definition
diff --git a/internal/config/config_test.go b/internal/config/config_test.go
index 831691e..030e027 100644
--- a/internal/config/config_test.go
+++ b/internal/config/config_test.go
@@ -8,7 +8,7 @@ import (
"strings"
"testing"
- "git.xdrm.io/go/aicra/datatype/builtin"
+ "github.com/xdrm-io/aicra/datatype/builtin"
)
func TestLegalServiceName(t *testing.T) {
diff --git a/internal/config/parameter.go b/internal/config/parameter.go
index 23bfd3d..d0e5ab7 100644
--- a/internal/config/parameter.go
+++ b/internal/config/parameter.go
@@ -3,7 +3,7 @@ package config
import (
"reflect"
- "git.xdrm.io/go/aicra/datatype"
+ "github.com/xdrm-io/aicra/datatype"
)
// Parameter represents a parameter definition (from api.json)
diff --git a/internal/config/service.go b/internal/config/service.go
index c713db2..3b051ba 100644
--- a/internal/config/service.go
+++ b/internal/config/service.go
@@ -6,7 +6,7 @@ import (
"regexp"
"strings"
- "git.xdrm.io/go/aicra/datatype"
+ "github.com/xdrm-io/aicra/datatype"
)
var braceRegex = regexp.MustCompile(`^{([a-z_-]+)}$`)
diff --git a/internal/dynfunc/handler.go b/internal/dynfunc/handler.go
index 783612b..395d485 100644
--- a/internal/dynfunc/handler.go
+++ b/internal/dynfunc/handler.go
@@ -6,8 +6,8 @@ import (
"log"
"reflect"
- "git.xdrm.io/go/aicra/api"
- "git.xdrm.io/go/aicra/internal/config"
+ "github.com/xdrm-io/aicra/api"
+ "github.com/xdrm-io/aicra/internal/config"
)
// Handler represents a dynamic aicra service handler
diff --git a/internal/dynfunc/handler_test.go b/internal/dynfunc/handler_test.go
index 053cc25..1ddd1c5 100644
--- a/internal/dynfunc/handler_test.go
+++ b/internal/dynfunc/handler_test.go
@@ -6,7 +6,7 @@ import (
"reflect"
"testing"
- "git.xdrm.io/go/aicra/api"
+ "github.com/xdrm-io/aicra/api"
)
type testsignature Signature
diff --git a/internal/dynfunc/signature.go b/internal/dynfunc/signature.go
index e0f9a19..35783ab 100644
--- a/internal/dynfunc/signature.go
+++ b/internal/dynfunc/signature.go
@@ -6,8 +6,8 @@ import (
"reflect"
"strings"
- "git.xdrm.io/go/aicra/api"
- "git.xdrm.io/go/aicra/internal/config"
+ "github.com/xdrm-io/aicra/api"
+ "github.com/xdrm-io/aicra/internal/config"
)
// Signature represents input/output arguments for service from the aicra configuration
diff --git a/internal/dynfunc/signature_test.go b/internal/dynfunc/signature_test.go
index 874834c..3554abf 100644
--- a/internal/dynfunc/signature_test.go
+++ b/internal/dynfunc/signature_test.go
@@ -7,7 +7,7 @@ import (
"reflect"
"testing"
- "git.xdrm.io/go/aicra/api"
+ "github.com/xdrm-io/aicra/api"
)
func TestInputCheck(t *testing.T) {
diff --git a/internal/reqdata/set.go b/internal/reqdata/set.go
index c8aac46..2b217dd 100644
--- a/internal/reqdata/set.go
+++ b/internal/reqdata/set.go
@@ -6,8 +6,8 @@ import (
"io"
"reflect"
- "git.xdrm.io/go/aicra/internal/config"
- "git.xdrm.io/go/aicra/internal/multipart"
+ "github.com/xdrm-io/aicra/internal/config"
+ "github.com/xdrm-io/aicra/internal/multipart"
"net/http"
"strings"
diff --git a/internal/reqdata/set_test.go b/internal/reqdata/set_test.go
index 771d863..b71a7be 100644
--- a/internal/reqdata/set_test.go
+++ b/internal/reqdata/set_test.go
@@ -10,7 +10,7 @@ import (
"strings"
"testing"
- "git.xdrm.io/go/aicra/internal/config"
+ "github.com/xdrm-io/aicra/internal/config"
)
func getEmptyService() *config.Service {
From b3ef7de624e0cee1ca669ba95f78fd4ec10385a1 Mon Sep 17 00:00:00 2001
From: xdrm-brackets
Date: Sun, 20 Jun 2021 21:47:17 +0200
Subject: [PATCH 2/3] migrate: drone CI to github actions
---
.drone.yml | 11 -----------
.github/workflows/go.yml | 27 +++++++++++++++++++++++++++
2 files changed, 27 insertions(+), 11 deletions(-)
delete mode 100644 .drone.yml
create mode 100644 .github/workflows/go.yml
diff --git a/.drone.yml b/.drone.yml
deleted file mode 100644
index ee647d8..0000000
--- a/.drone.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-kind: pipeline
-type: docker
-name: default
-
-steps:
-- name: test
- image: golang:1.13
- commands:
- - go get ./...
- - go test -v -race -cover -coverprofile ./coverage.out ./...
\ No newline at end of file
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
new file mode 100644
index 0000000..b789456
--- /dev/null
+++ b/.github/workflows/go.yml
@@ -0,0 +1,27 @@
+name: Go
+
+on:
+ push:
+ branches:
+ - '**'
+ pull_request:
+ branches:
+ - '**'
+
+jobs:
+
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Set up Go
+ uses: actions/setup-go@v2
+ with:
+ go-version: 1.16
+
+ - name: Build
+ run: go build -v ./...
+
+ - name: Test
+ run: go test -race -v ./... -cover
From 36991ea9ef774e4ac5dce168cd2ac38ecb241127 Mon Sep 17 00:00:00 2001
From: xdrm-brackets
Date: Sun, 20 Jun 2021 21:49:56 +0200
Subject: [PATCH 3/3] docs: add build status
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 9a6318c..9c03075 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,7 @@
[![Go version](https://img.shields.io/badge/go_version-1.16-blue.svg)](https://golang.org/doc/go1.16)
[![Go doc](https://pkg.go.dev/badge/github.com/xdrm-io/aicra)](https://pkg.go.dev/github.com/xdrm-io/aicra)
[![Go Report Card](https://goreportcard.com/badge/github.com/xdrm-io/aicra)](https://goreportcard.com/report/github.com/xdrm-io/aicra)
+[![Build status](https://github.com/xdrm-io/aicra/actions/workflows/go.yml/badge.svg)](https://github.com/xdrm-io/aicra/actions/workflows/go.yml)
## Presentation