refactor: change project structure and package name

This commit is contained in:
Rico 2022-08-27 17:21:43 +02:00
parent c1468e8ae4
commit ad10e9a062
No known key found for this signature in database
GPG key ID: 91F477359C5B7AD3
163 changed files with 104 additions and 135 deletions

View file

@ -1,10 +1,9 @@
package main
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/drawing"
"os"
"github.com/wcharczuk/go-chart/v2"
"github.com/wcharczuk/go-chart/v2/drawing"
)
func main() {

View file

@ -1,10 +1,9 @@
package main
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/drawing"
"os"
"github.com/wcharczuk/go-chart/v2"
"github.com/wcharczuk/go-chart/v2/drawing"
)
func main() {

View file

@ -3,11 +3,10 @@ package main
import (
"flag"
"fmt"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"io/ioutil"
"os"
"strings"
"github.com/wcharczuk/go-chart/v2"
)
var (

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
chart "github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
chart "github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -3,10 +3,9 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/drawing"
"os"
"github.com/wcharczuk/go-chart/v2"
"github.com/wcharczuk/go-chart/v2/drawing"
)
func main() {

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -4,11 +4,10 @@ package main
import (
"fmt"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"math/rand"
"os"
"time"
"github.com/wcharczuk/go-chart/v2"
)
func random(min, max float64) float64 {

View file

@ -2,10 +2,9 @@ package main
import (
"fmt"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"log"
"net/http"
"github.com/wcharczuk/go-chart/v2"
)
// Note: Additional examples on how to add Stylesheets are in the custom_stylesheets example

View file

@ -4,9 +4,8 @@ package main
import (
"fmt"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -3,10 +3,9 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/drawing"
"os"
"github.com/wcharczuk/go-chart/v2"
"github.com/wcharczuk/go-chart/v2/drawing"
)
func main() {

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -3,10 +3,9 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/drawing"
"os"
"github.com/wcharczuk/go-chart/v2"
"github.com/wcharczuk/go-chart/v2/drawing"
)
func main() {

View file

@ -2,10 +2,9 @@ package main
import (
"fmt"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"log"
"net/http"
"github.com/wcharczuk/go-chart/v2"
)
const style = "svg .background { fill: white; }" +

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -2,9 +2,8 @@ package main
import (
"fmt"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"log"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
chart "github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
chart "github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
chart "github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -4,12 +4,11 @@ package main
import (
"fmt"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"net/http"
"os"
"strconv"
"time"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -1,12 +1,11 @@
package main
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"log"
"net/http"
"sync"
"time"
"github.com/wcharczuk/go-chart/v2"
)
var lock sync.Mutex

View file

@ -1,13 +1,12 @@
package main
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/drawing"
"log"
"net/http"
_ "net/http/pprof"
"github.com/wcharczuk/go-chart/v2"
"github.com/wcharczuk/go-chart/v2/drawing"
)
func drawChart(res http.ResponseWriter, req *http.Request) {

View file

@ -3,9 +3,8 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -1,9 +1,8 @@
package main
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -3,11 +3,10 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/drawing"
"os"
"time"
"github.com/wcharczuk/go-chart/v2"
"github.com/wcharczuk/go-chart/v2/drawing"
)
func main() {

View file

@ -3,10 +3,9 @@ package main
//go:generate go run main.go
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/drawing"
"os"
"github.com/wcharczuk/go-chart/v2"
"github.com/wcharczuk/go-chart/v2/drawing"
)
func main() {

View file

@ -1,10 +1,9 @@
package main
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"net/http"
"time"
chart "github.com/wcharczuk/go-chart/v2"
)
func drawChart(res http.ResponseWriter, req *http.Request) {

View file

@ -4,9 +4,8 @@ package main
import (
"fmt"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

View file

@ -4,10 +4,9 @@ package main
import (
"bytes"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/chart"
"log"
"os"
"github.com/wcharczuk/go-chart/v2"
)
func main() {

2
go.mod
View file

@ -1,4 +1,4 @@
module github.com/wcharczuk/go-chart/v2
module github.com/d-Rickyy-b/go-chart-x/v2
go 1.15

View file

@ -1,11 +1,11 @@
package chart
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/drawing"
"image/color"
"testing"
"github.com/wcharczuk/go-chart/v2/drawing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestAnnotationSeriesMeasure(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"math"
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestBarChartRender(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"math"
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestBollingerBandSeries(t *testing.T) {

View file

@ -4,7 +4,7 @@ import (
"math"
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestBoxClone(t *testing.T) {

View file

@ -2,14 +2,14 @@ package chart
import (
"bytes"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/drawing"
"image"
"image/png"
"math"
"testing"
"time"
"github.com/wcharczuk/go-chart/v2/drawing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestChartGetDPI(t *testing.T) {

View file

@ -1,6 +1,8 @@
package chart
import "github.com/wcharczuk/go-chart/v2/drawing"
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/drawing"
)
var (
// ColorWhite is white.

View file

@ -3,7 +3,7 @@ package chart
import (
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestConcatSeries(t *testing.T) {

View file

@ -3,7 +3,7 @@ package chart
import (
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestRangeTranslate(t *testing.T) {

View file

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestContinuousSeries(t *testing.T) {

View file

@ -4,7 +4,7 @@ import (
"bytes"
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestDonutChart(t *testing.T) {

View file

@ -3,7 +3,7 @@ package chart
import (
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
var (

View file

@ -3,7 +3,7 @@ package chart
import (
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestFirstValueAnnotation(t *testing.T) {

View file

@ -1,10 +1,10 @@
package chart
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/roboto"
"sync"
"github.com/golang/freetype/truetype"
"github.com/wcharczuk/go-chart/v2/roboto"
)
var (

View file

@ -3,7 +3,7 @@ package chart
import (
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestGenerateGridLines(t *testing.T) {

View file

@ -3,7 +3,7 @@ package chart
import (
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestHistogramSeries(t *testing.T) {

View file

@ -1,6 +1,8 @@
package chart
import "github.com/wcharczuk/go-chart/v2/drawing"
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/drawing"
)
// Jet is a color map provider based on matlab's jet color map.
func Jet(v, vmin, vmax float64) drawing.Color {

View file

@ -3,7 +3,7 @@ package chart
import (
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestLastValueAnnotationSeries(t *testing.T) {

View file

@ -1,7 +1,7 @@
package chart
import (
"github.com/wcharczuk/go-chart/v2/drawing"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/drawing"
)
// Legend returns a legend renderable function.

View file

@ -4,7 +4,7 @@ import (
"bytes"
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestLegend(t *testing.T) {

View file

@ -3,7 +3,7 @@ package chart
import (
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestLinearRegressionSeries(t *testing.T) {

View file

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
var (

View file

@ -3,7 +3,7 @@ package chart
import (
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestPercentageDifferenceSeries(t *testing.T) {

View file

@ -4,7 +4,7 @@ import (
"bytes"
"testing"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestPieChart(t *testing.T) {

View file

@ -2,9 +2,8 @@ package chart
import (
"fmt"
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/matrix"
"math"
"github.com/wcharczuk/go-chart/v2/matrix"
)
// Interface Assertions.

View file

@ -1,10 +1,10 @@
package chart
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/matrix"
"testing"
"github.com/wcharczuk/go-chart/v2/matrix"
"github.com/wcharczuk/go-chart/v2/testutil"
"github.com/d-Rickyy-b/go-chart-x/v2/testutil"
)
func TestPolynomialRegression(t *testing.T) {

View file

@ -1,13 +1,13 @@
package chart
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/drawing"
"image"
"image/png"
"io"
"math"
"github.com/golang/freetype/truetype"
"github.com/wcharczuk/go-chart/v2/drawing"
)
// PNG returns a new png/raster renderer.

View file

@ -1,10 +1,10 @@
package chart
import (
"github.com/d-Rickyy-b/go-chart-x/v2/pkg/drawing"
"io"
"github.com/golang/freetype/truetype"
"github.com/wcharczuk/go-chart/v2/drawing"
)
// Renderer represents the basic methods required to draw a chart.

Some files were not shown because too many files have changed in this diff Show more