JacobHawley's picture
download
raw
20.7 kB
diff --git a/scriggo_method_decl_verify_test.go b/scriggo_method_decl_verify_test.go new file mode 100644 index 00000000..646354a5 --- /dev/null +++ b/scriggo_method_decl_verify_test.go @@ -0,0 +1,1224 @@ +package scriggo_test + +import ( + "bytes" + "fmt" + "reflect" + "strings" + "testing" + + "github.com/open2b/scriggo" + "github.com/open2b/scriggo/internal/fstest" + "github.com/open2b/scriggo/native" +) + +func fmtPackageForTest(output *bytes.Buffer) native.Packages { + return native.Packages{ + "fmt": native.Package{ + Name: "fmt", + Declarations: native.Declarations{ + "Println": func(args ...any) { + strs := make([]string, len(args)) + for i, arg := range args { + strs[i] = fmt.Sprint(arg) + } + output.WriteString(strings.Join(strs, " ") + "\n") + }, + "Sprintf": fmt.Sprintf, + "Sprint": fmt.Sprint, + "Stringer": reflect.TypeOf((*fmt.Stringer)(nil)).Elem(), + }, + }, + } +} + +var methodDeclarationCases = []struct { + name string + src string + expectedOut string + expectErr bool + errContains string +}{ + { + name: "value receiver on int type returns int", + src: `package main + +import "fmt" + +type MyInt int + +func (m MyInt) Double() int { + return int(m) * 2 +} + +func main() { + var x MyInt = 5 + fmt.Println(x.Double()) +} +`, + expectedOut: "10\n", + }, + { + name: "value receiver on string type returns string", + src: `package main + +import "fmt" + +type Name string + +func (n Name) Greet() string { + return "Hello, " + string(n) + "!" +} + +func main() { + var n Name = "Alice" + fmt.Println(n.Greet()) +} +`, + expectedOut: "Hello, Alice!\n", + }, + { + name: "method with multiple parameters", + src: `package main + +import "fmt" + +type Adder int + +func (a Adder) Add(x int, y int) int { + return int(a) + x + y +} + +func main() { + var a Adder = 10 + fmt.Println(a.Add(3, 7)) +} +`, + expectedOut: "20\n", + }, + { + name: "multiple methods on same type", + src: `package main + +import "fmt" + +type Counter int + +func (c Counter) Value() int { + return int(c) +} + +func (c Counter) IsZero() bool { + return c == 0 +} + +func main() { + var c Counter = 42 + fmt.Println(c.Value()) + fmt.Println(c.IsZero()) + var z Counter = 0 + fmt.Println(z.IsZero()) +} +`, + expectedOut: "42\nfalse\ntrue\n", + }, + { + name: "method returns multiple values", + src: `package main + +import "fmt" + +type Pair struct { + A int + B int +} + +func (p Pair) Swap() (int, int) { + return p.B, p.A +} + +func main() { + p := Pair{A: 1, B: 2} + a, b := p.Swap() + fmt.Println(a, b) +} +`, + expectedOut: "2 1\n", + }, + { + name: "method on struct type", + src: `package main + +import "fmt" + +type Point struct { + X int + Y int +} + +func (p Point) Sum() int { + return p.X + p.Y +} + +func main() { + pt := Point{X: 3, Y: 4} + fmt.Println(pt.Sum()) +} +`, + expectedOut: "7\n", + }, + { + name: "struct method returns string from fields", + src: `package main + +import "fmt" + +type Pair struct { + First string + Second string +} + +func (p Pair) Combined() string { + return p.First + "-" + p.Second +} + +func main() { + p := Pair{First: "hello", Second: "world"} + fmt.Println(p.Combined()) +} +`, + expectedOut: "hello-world\n", + }, + { + name: "method result used in arithmetic expression", + src: `package main + +import "fmt" + +type MyInt int + +func (m MyInt) Triple() int { + return int(m) * 3 +} + +func main() { + var x MyInt = 4 + result := x.Triple() + 1 + fmt.Println(result) +} +`, + expectedOut: "13\n", + }, + { + name: "method with no return value calls fmt", + src: `package main + +import "fmt" + +type Logger struct { + Prefix string +} + +func (l Logger) Log(msg string) { + fmt.Println(l.Prefix + ": " + msg) +} + +func main() { + log := Logger{Prefix: "INFO"} + log.Log("started") + log.Log("finished") +} +`, + expectedOut: "INFO: started\nINFO: finished\n", + }, + { + name: "method calling another method on same type", + src: `package main + +import "fmt" + +type Num int + +func (n Num) Double() int { + return int(n) * 2 +} + +func (n Num) Quadruple() int { + return Num(n.Double()).Double() +} + +func main() { + var x Num = 3 + fmt.Println(x.Quadruple()) +} +`, + expectedOut: "12\n", + }, + { + name: "method coexists with regular function", + src: `package main + +import "fmt" + +type Val int + +func (v Val) Get() int { + return int(v) +} + +func double(x int) int { + return x * 2 +} + +func main() { + var v Val = 7 + fmt.Println(double(v.Get())) +} +`, + expectedOut: "14\n", + }, + { + name: "method on bool defined type", + src: `package main + +import "fmt" + +type Flag bool + +func (f Flag) String() string { + if f { + return "on" + } + return "off" +} + +func main() { + var a Flag = true + var b Flag = false + fmt.Println(a.String()) + fmt.Println(b.String()) +} +`, + expectedOut: "on\noff\n", + }, + { + name: "two different types with same method name", + src: `package main + +import "fmt" + +type Cat struct { + Name string +} + +func (c Cat) Speak() string { + return c.Name + " says meow" +} + +type Dog struct { + Name string +} + +func (d Dog) Speak() string { + return d.Name + " says woof" +} + +func main() { + c := Cat{Name: "Whiskers"} + d := Dog{Name: "Buddy"} + fmt.Println(c.Speak()) + fmt.Println(d.Speak()) +} +`, + expectedOut: "Whiskers says meow\nBuddy says woof\n", + }, + { + name: "method result used in if condition", + src: `package main + +import "fmt" + +type Age int + +func (a Age) IsAdult() bool { + return a >= 18 +} + +func main() { + ages := []int{15, 18, 21, 10} + for _, v := range ages { + a := Age(v) + if a.IsAdult() { + fmt.Println(v, "adult") + } else { + fmt.Println(v, "minor") + } + } +} +`, + expectedOut: "15 minor\n18 adult\n21 adult\n10 minor\n", + }, + { + name: "method called on zero value", + src: `package main + +import "fmt" + +type Score int + +func (s Score) Display() string { + return fmt.Sprintf("score=%d", int(s)) +} + +func main() { + var s Score + fmt.Println(s.Display()) +} +`, + expectedOut: "score=0\n", + }, + { + name: "multiple methods with different return types", + src: `package main + +import "fmt" + +type Temperature int + +func (t Temperature) Celsius() int { + return int(t) +} + +func (t Temperature) IsFreezing() bool { + return t <= 0 +} + +func (t Temperature) Label() string { + if t <= 0 { + return "cold" + } + return "warm" +} + +func main() { + var t Temperature = -5 + fmt.Println(t.Celsius()) + fmt.Println(t.IsFreezing()) + fmt.Println(t.Label()) +} +`, + expectedOut: "-5\ntrue\ncold\n", + }, + { + name: "method on slice defined type", + src: `package main + +import "fmt" + +type IntSlice []int + +func (s IntSlice) Sum() int { + total := 0 + for _, v := range s { + total = total + v + } + return total +} + +func main() { + s := IntSlice{1, 2, 3, 4, 5} + fmt.Println(s.Sum()) +} +`, + expectedOut: "15\n", + }, + { + name: "method on map defined type", + src: `package main + +import "fmt" + +type StringMap map[string]int + +func (m StringMap) Has(key string) bool { + _, ok := m[key] + return ok +} + +func main() { + m := StringMap{"a": 1, "b": 2} + fmt.Println(m.Has("a")) + fmt.Println(m.Has("c")) +} +`, + expectedOut: "true\nfalse\n", + }, + { + name: "method on array defined type", + src: `package main + +import "fmt" + +type Pair [2]int + +func (p Pair) Sum() int { + return p[0] + p[1] +} + +func main() { + p := Pair{10, 20} + fmt.Println(p.Sum()) +} +`, + expectedOut: "30\n", + }, + { + name: "method on channel defined type", + src: `package main + +import "fmt" + +type IntChan chan int + +func (c IntChan) SendAndReceive(v int) int { + c <- v + return <-c +} + +func main() { + c := make(IntChan, 1) + fmt.Println(c.SendAndReceive(99)) +} +`, + expectedOut: "99\n", + }, + { + name: "struct method accessing multiple fields", + src: `package main + +import "fmt" + +type Rect struct { + Width int + Height int +} + +func (r Rect) Area() int { + return r.Width * r.Height +} + +func (r Rect) Perimeter() int { + return 2 * (r.Width + r.Height) +} + +func main() { + r := Rect{Width: 5, Height: 3} + fmt.Println(r.Area()) + fmt.Println(r.Perimeter()) +} +`, + expectedOut: "15\n16\n", + }, + { + name: "anonymous receiver without name", + src: `package main + +import "fmt" + +type MyInt int + +func (MyInt) Greet() string { + return "hello" +} + +func main() { + var x MyInt = 10 + fmt.Println(x.Greet()) +} +`, + expectedOut: "hello\n", + }, + { + name: "method result passed to function", + src: `package main + +import "fmt" + +type Num int + +func (n Num) Value() int { + return int(n) +} + +func add(a int, b int) int { + return a + b +} + +func main() { + var x Num = 3 + var y Num = 7 + fmt.Println(add(x.Value(), y.Value())) +} +`, + expectedOut: "10\n", + }, + { + name: "method on struct with string and int fields", + src: `package main + +import "fmt" + +type Item struct { + Name string + Count int +} + +func (it Item) Summary() string { + return fmt.Sprintf("%s:%d", it.Name, it.Count) +} + +func main() { + a := Item{Name: "apple", Count: 3} + fmt.Println(a.Summary()) +} +`, + expectedOut: "apple:3\n", + }, + { + name: "method on function defined type", + src: `package main + +import "fmt" + +type Transform func(int) int + +func (t Transform) Apply(x int) int { + return t(x) +} + +func main() { + var t Transform = func(x int) int { return x * 3 } + fmt.Println(t.Apply(4)) +} +`, + expectedOut: "12\n", + }, + { + name: "error method on non-local type int", + src: "package main\n\nfunc (i int) Double() int {\n\treturn i * 2\n}\n\nfunc main() {}\n", + expectErr: true, + }, + { + name: "error method on pointer-to-pointer receiver", + src: "package main\n\ntype MyInt int\n\nfunc (m **MyInt) Foo() {}\n\nfunc main() {}\n", + expectErr: true, + }, + { + name: "error method on undefined receiver type", + src: "package main\n\nfunc (x Undefined) Foo() {}\n\nfunc main() {}\n", + expectErr: true, + }, + { + name: "pointer receiver mutates struct field", + src: `package main + +import "fmt" + +type Account struct { + Balance int +} + +func (a *Account) Deposit(amount int) { + a.Balance = a.Balance + amount +} + +func main() { + acc := Account{Balance: 100} + acc.Deposit(50) + fmt.Println(acc.Balance) +} +`, + expectedOut: "150\n", + }, + { + name: "pointer receiver on int type increments", + src: `package main + +import "fmt" + +type Counter int + +func (c *Counter) Increment() { + *c = *c + 1 +} + +func (c Counter) Value() int { + return int(c) +} + +func main() { + var c Counter = 0 + c.Increment() + c.Increment() + c.Increment() + fmt.Println(c.Value()) +} +`, + expectedOut: "3\n", + }, + { + name: "mixed value and pointer receivers on same type", + src: `package main + +import "fmt" + +type Stack struct { + Items []int +} + +func (s Stack) Len() int { + return len(s.Items) +} + +func (s *Stack) Push(v int) { + s.Items = append(s.Items, v) +} + +func main() { + s := Stack{Items: []int{}} + s.Push(10) + s.Push(20) + s.Push(30) + fmt.Println(s.Len()) +} +`, + expectedOut: "3\n", + }, + { + name: "pointer receiver modifying string field", + src: `package main + +import "fmt" + +type Label struct { + Text string +} + +func (l *Label) SetText(t string) { + l.Text = t +} + +func (l Label) Display() string { + return l.Text +} + +func main() { + l := Label{Text: "initial"} + l.SetText("updated") + fmt.Println(l.Display()) +} +`, + expectedOut: "updated\n", + }, + { + name: "pointer receiver with multiple fields mutation", + src: `package main + +import "fmt" + +type Vec2 struct { + X int + Y int +} + +func (v *Vec2) Translate(dx int, dy int) { + v.X = v.X + dx + v.Y = v.Y + dy +} + +func (v Vec2) String() string { + return fmt.Sprintf("(%d,%d)", v.X, v.Y) +} + +func main() { + v := Vec2{X: 1, Y: 2} + v.Translate(3, 4) + fmt.Println(v.String()) +} +`, + expectedOut: "(4,6)\n", + }, + { + name: "pointer receiver chain of mutations", + src: `package main + +import "fmt" + +type Config struct { + Width int + Height int + Title string +} + +func (c *Config) SetWidth(w int) { + c.Width = w +} + +func (c *Config) SetHeight(h int) { + c.Height = h +} + +func (c *Config) SetTitle(t string) { + c.Title = t +} + +func (c Config) Summary() string { + return fmt.Sprintf("%s:%dx%d", c.Title, c.Width, c.Height) +} + +func main() { + c := Config{} + c.SetWidth(800) + c.SetHeight(600) + c.SetTitle("app") + fmt.Println(c.Summary()) +} +`, + expectedOut: "app:800x600\n", + }, + { + name: "method expression on value receiver type called directly", + src: `package main + +import "fmt" + +type MyInt int + +func (m MyInt) Double() int { + return int(m) * 2 +} + +func main() { + var x MyInt = 7 + result := MyInt.Double(x) + fmt.Println(result) +} +`, + expectedOut: "14\n", + }, + { + name: "method expression assigned to variable then called", + src: `package main + +import "fmt" + +type Greeter struct { + Name string +} + +func (g Greeter) Hello() string { + return "hello " + g.Name +} + +func main() { + f := Greeter.Hello + g := Greeter{Name: "world"} + fmt.Println(f(g)) +} +`, + expectedOut: "hello world\n", + }, + { + name: "method expression with parameters", + src: `package main + +import "fmt" + +type Calculator int + +func (c Calculator) Add(a int, b int) int { + return int(c) + a + b +} + +func main() { + addFn := Calculator.Add + var c Calculator = 100 + fmt.Println(addFn(c, 20, 30)) +} +`, + expectedOut: "150\n", + }, + { + name: "pointer method expression with star type", + src: `package main + +import "fmt" + +type Accumulator struct { + Total int +} + +func (a *Accumulator) Add(v int) { + a.Total = a.Total + v +} + +func main() { + addFn := (*Accumulator).Add + acc := Accumulator{Total: 0} + addFn(&acc, 10) + addFn(&acc, 20) + fmt.Println(acc.Total) +} +`, + expectedOut: "30\n", + }, + { + name: "method expression on struct with return value", + src: `package main + +import "fmt" + +type Pair struct { + A int + B int +} + +func (p Pair) Sum() int { + return p.A + p.B +} + +func main() { + sumFn := Pair.Sum + p1 := Pair{A: 3, B: 4} + p2 := Pair{A: 10, B: 20} + fmt.Println(sumFn(p1)) + fmt.Println(sumFn(p2)) +} +`, + expectedOut: "7\n30\n", + }, + { + name: "pointer receiver with unnamed receiver parameter", + src: `package main + +import "fmt" + +type Dummy struct { + V int +} + +func (*Dummy) StaticGreet() string { + return "greetings" +} + +func main() { + d := Dummy{V: 42} + fmt.Println(d.StaticGreet()) +} +`, + expectedOut: "greetings\n", + }, + { + name: "error method expression needs pointer receiver", + src: "package main\n\ntype Num int\n\nfunc (n *Num) Inc() {}\n\nfunc main() {\n\t_ = Num.Inc\n}\n", + expectErr: true, + }, + + { + name: "pointer receiver on slice defined type", + src: `package main + +import "fmt" + +type IntList []int + +func (l *IntList) Append(v int) { + *l = append(*l, v) +} + +func (l IntList) Len() int { + return len(l) +} + +func main() { + var l IntList + l.Append(1) + l.Append(2) + l.Append(3) + fmt.Println(l.Len()) +} +`, + expectedOut: "3\n", + }, + { + name: "pointer receiver method returns multiple values", + src: `package main + +import "fmt" + +type Container struct { + Value int + Valid bool +} + +func (c *Container) Set(v int) { + c.Value = v + c.Valid = true +} + +func (c Container) Get() (int, bool) { + return c.Value, c.Valid +} + +func main() { + c := Container{} + c.Set(42) + v, ok := c.Get() + fmt.Println(v, ok) +} +`, + expectedOut: "42 true\n", + }, + + { + name: "mixed method expressions value and pointer on same type", + src: `package main + +import "fmt" + +type Num int + +func (n Num) AsInt() int { + return int(n) +} + +func (n *Num) SetTo(v int) { + *n = Num(v) +} + +func main() { + asInt := Num.AsInt + setTo := (*Num).SetTo + var x Num = 3 + fmt.Println(asInt(x)) + setTo(&x, 99) + fmt.Println(asInt(x)) +} +`, + expectedOut: "3\n99\n", + }, + { + name: "pointer receiver on struct with method calling another method", + src: `package main + +import "fmt" + +type State struct { + Count int +} + +func (s *State) Increment() { + s.Count = s.Count + 1 +} + +func (s *State) IncrementBy(n int) { + for i := 0; i < n; i++ { + s.Increment() + } +} + +func main() { + s := State{Count: 0} + s.IncrementBy(5) + fmt.Println(s.Count) +} +`, + expectedOut: "5\n", + }, + { + name: "interface satisfaction basic assignment", + src: `package main + +import "fmt" + +type MyInt int + +func (m MyInt) String() string { + return fmt.Sprint(int(m)) +} + +func main() { + var s fmt.Stringer = MyInt(42) + fmt.Println(s.String()) +} +`, + expectedOut: "42\n", + }, + { + name: "interface satisfaction pointer receiver", + src: `package main + +import "fmt" + +type Counter struct { + Val int +} + +func (c *Counter) String() string { + return fmt.Sprint(c.Val) +} + +func main() { + c := &Counter{Val: 7} + var s fmt.Stringer = c + fmt.Println(s.String()) +} +`, + expectedOut: "7\n", + }, + { + name: "interface satisfaction passed to function", + src: `package main + +import "fmt" + +type Label string + +func (l Label) String() string { + return "label:" + string(l) +} + +func printStringer(s fmt.Stringer) { + fmt.Println(s.String()) +} + +func main() { + printStringer(Label("hello")) +} +`, + expectedOut: "label:hello\n", + }, + { + name: "interface satisfaction error interface", + src: `package main + +import "fmt" + +type MyErr string + +func (e MyErr) Error() string { + return "error: " + string(e) +} + +func main() { + var e error = MyErr("something failed") + fmt.Println(e.Error()) +} +`, + expectedOut: "error: something failed\n", + }, + { + name: "interface satisfaction value receiver does not satisfy pointer interface", + src: `package main + +import "fmt" + +type Num int + +func (n *Num) String() string { + return fmt.Sprint(int(*n)) +} + +func main() { + var n Num = 5 + var s fmt.Stringer = n + _ = s +} +`, + expectErr: true, + }, + { + name: "interface satisfaction multiple calls through interface", + src: `package main + +import "fmt" + +type Word string + +func (w Word) String() string { + return string(w) +} + +func main() { + var s fmt.Stringer + s = Word("first") + fmt.Println(s.String()) + s = Word("second") + fmt.Println(s.String()) +} +`, + expectedOut: "first\nsecond\n", + }, + { + name: "interface satisfaction struct type", + src: `package main + +import "fmt" + +type Person struct { + Name string + Age int +} + +func (p Person) String() string { + return p.Name + ":" + fmt.Sprint(p.Age) +} + +func main() { + var s fmt.Stringer = Person{Name: "Alice", Age: 30} + fmt.Println(s.String()) +} +`, + expectedOut: "Alice:30\n", + }, +} + +func TestScriggoMethodDeclVerify(t *testing.T) { + for _, tc := range methodDeclarationCases { + t.Run(tc.name, func(t *testing.T) { + defer func() { + if r := recover(); r != nil { + t.Fatalf("panic: %v", r) + } + }() + fsys := fstest.Files{"main.go": tc.src} + var output bytes.Buffer + opts := &scriggo.BuildOptions{Packages: fmtPackageForTest(&output)} + if tc.expectedOut == "" && !tc.expectErr { + opts = nil + } + program, err := scriggo.Build(fsys, opts) + if tc.expectErr { + if err == nil { + t.Fatal("expected build error, got nil") + } + if tc.errContains != "" && !strings.Contains(err.Error(), tc.errContains) { + t.Errorf("error %q does not contain %q", err.Error(), tc.errContains) + } + return + } + if err != nil { + t.Fatalf("build error: %s", err) + } + err = program.Run(nil) + if err != nil { + t.Fatalf("run error: %s", err) + } + if tc.expectedOut != "" { + if got := output.String(); got != tc.expectedOut { + t.Errorf("unexpected output:\ngot: %q\nwant: %q", got, tc.expectedOut) + } + } + }) + } +} diff --git a/test.sh b/test.sh new file mode 100755 index 00000000..bea27ecd --- /dev/null +++ b/test.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +cd "$(dirname "$0")" + +case "$1" in + base) + go test -v -count=1 . -run "Example|TestFormatFS|TestInitGlobals|TestInitPackageLevelVariables|TestUnexpandedTransformer" + go test -v -count=1 ./ast/... + go test -v -count=1 ./builtin/... + go test -v -count=1 ./cmd/scriggo/... + go test -v -count=1 ./internal/compiler/... + go test -v -count=1 ./internal/runtime/... + go test -v -count=1 ./native/... + (cd test && go test -v -count=1 ./misc/...) + (cd test && go test -v -count=1 ./compare/...) + ;; + new) + go test -v -count=1 . -run "TestScriggoMethodDeclVerify" + ;; + *) + echo "Usage: ./test.sh {base|new}" + exit 1 + ;; +esac
diff --git a/scriggo_method_decl_verify_test.go b/scriggo_method_decl_verify_test.go
new file mode 100644
index 00000000..646354a5
--- /dev/null
+++ b/scriggo_method_decl_verify_test.go
@@ -0,0 +1,1224 @@
+package scriggo_test
+
+import (
+ "bytes"
+ "fmt"
+ "reflect"
+ "strings"
+ "testing"
+
+ "github.com/open2b/scriggo"
+ "github.com/open2b/scriggo/internal/fstest"
+ "github.com/open2b/scriggo/native"
+)
+
+func fmtPackageForTest(output *bytes.Buffer) native.Packages {
+ return native.Packages{
+ "fmt": native.Package{
+ Name: "fmt",
+ Declarations: native.Declarations{
+ "Println": func(args ...any) {
+ strs := make([]string, len(args))
+ for i, arg := range args {
+ strs[i] = fmt.Sprint(arg)
+ }
+ output.WriteString(strings.Join(strs, " ") + "\n")
+ },
+ "Sprintf": fmt.Sprintf,
+ "Sprint": fmt.Sprint,
+ "Stringer": reflect.TypeOf((*fmt.Stringer)(nil)).Elem(),
+ },
+ },
+ }
+}
+
+var methodDeclarationCases = []struct {
+ name string
+ src string
+ expectedOut string
+ expectErr bool
+ errContains string
+}{
+ {
+ name: "value receiver on int type returns int",
+ src: `package main
+
+import "fmt"
+
+type MyInt int
+
+func (m MyInt) Double() int {
+ return int(m) * 2
+}
+
+func main() {
+ var x MyInt = 5
+ fmt.Println(x.Double())
+}
+`,
+ expectedOut: "10\n",
+ },
+ {
+ name: "value receiver on string type returns string",
+ src: `package main
+
+import "fmt"
+
+type Name string
+
+func (n Name) Greet() string {
+ return "Hello, " + string(n) + "!"
+}
+
+func main() {
+ var n Name = "Alice"
+ fmt.Println(n.Greet())
+}
+`,
+ expectedOut: "Hello, Alice!\n",
+ },
+ {
+ name: "method with multiple parameters",
+ src: `package main
+
+import "fmt"
+
+type Adder int
+
+func (a Adder) Add(x int, y int) int {
+ return int(a) + x + y
+}
+
+func main() {
+ var a Adder = 10
+ fmt.Println(a.Add(3, 7))

Xet Storage Details

Size:
20.7 kB
·
Xet hash:
9f6f28834e20db9b8d8531ec1b71379d9f0f74bfcda43af42d114037c0129ccd

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.