diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..d56adf88 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "apps/go-sdk/firecrawl"] + path = apps/go-sdk/firecrawl + url = https://github.com/mendableai/firecrawl-go +[submodule "apps/go-sdk/examples"] + path = apps/go-sdk/examples + url = https://github.com/mendableai/firecrawl-go-examples diff --git a/apps/go-sdk/examples/.gitignore b/apps/go-sdk/examples/.gitignore new file mode 100644 index 00000000..6f72f892 --- /dev/null +++ b/apps/go-sdk/examples/.gitignore @@ -0,0 +1,25 @@ +# If you prefer the allow list template instead of the deny list, see community template: +# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +go.work +go.work.sum + +# env file +.env diff --git a/apps/go-sdk/examples/LICENSE b/apps/go-sdk/examples/LICENSE new file mode 100644 index 00000000..25800a2e --- /dev/null +++ b/apps/go-sdk/examples/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Mendable + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/apps/go-sdk/examples/example.go b/apps/go-sdk/examples/example.go index 6097d22e..48ba49da 100644 --- a/apps/go-sdk/examples/example.go +++ b/apps/go-sdk/examples/example.go @@ -6,11 +6,11 @@ import ( "log" "github.com/google/uuid" - "github.com/mendableai/firecrawl/firecrawl" + "github.com/mendableai/firecrawl-go" ) func main() { - app, err := firecrawl.NewFirecrawlApp("fc-YOUR-API-KEY", "http://localhost:3002") + app, err := firecrawl.NewFirecrawlApp("fc-YOUR_API_KEY", "https://api.firecrawl.dev") if err != nil { log.Fatalf("Failed to create FirecrawlApp: %v", err) } diff --git a/apps/go-sdk/examples/go.mod b/apps/go-sdk/examples/go.mod index 8e47049c..3ea9b92f 100644 --- a/apps/go-sdk/examples/go.mod +++ b/apps/go-sdk/examples/go.mod @@ -1,10 +1,9 @@ -module github.com/mendableai/firecrawl/apps/go-sdk/examples +module github.com/mendableai/firecrawl-go-examples go 1.22.5 replace github.com/mendableai/firecrawl => ../ -require ( - github.com/google/uuid v1.6.0 - github.com/mendableai/firecrawl v0.0.0-00010101000000-000000000000 -) +require github.com/google/uuid v1.6.0 + +require github.com/mendableai/firecrawl-go v0.0.0-20240813205613-366e8d8dcf46 // indirect diff --git a/apps/go-sdk/examples/go.sum b/apps/go-sdk/examples/go.sum index e724cfb0..760ca553 100644 --- a/apps/go-sdk/examples/go.sum +++ b/apps/go-sdk/examples/go.sum @@ -4,6 +4,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/mendableai/firecrawl-go v0.0.0-20240813205613-366e8d8dcf46 h1:461um7fbSQYj2E3ETl8GINuRg5MTY3BdjMnogwUIhBs= +github.com/mendableai/firecrawl-go v0.0.0-20240813205613-366e8d8dcf46/go.mod h1:mTGbJ37fy43aaqonp/tdpzCH516jHFw/XVvfFi4QXHo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= diff --git a/apps/go-sdk/.env.example b/apps/go-sdk/firecrawl/.env.example similarity index 100% rename from apps/go-sdk/.env.example rename to apps/go-sdk/firecrawl/.env.example diff --git a/apps/go-sdk/firecrawl/.gitignore b/apps/go-sdk/firecrawl/.gitignore new file mode 100644 index 00000000..db27dc80 --- /dev/null +++ b/apps/go-sdk/firecrawl/.gitignore @@ -0,0 +1,2 @@ +.env +vendor \ No newline at end of file diff --git a/apps/go-sdk/LICENSE b/apps/go-sdk/firecrawl/LICENSE similarity index 100% rename from apps/go-sdk/LICENSE rename to apps/go-sdk/firecrawl/LICENSE diff --git a/apps/go-sdk/README.md b/apps/go-sdk/firecrawl/README.md similarity index 100% rename from apps/go-sdk/README.md rename to apps/go-sdk/firecrawl/README.md diff --git a/apps/go-sdk/go.mod b/apps/go-sdk/firecrawl/go.mod similarity index 84% rename from apps/go-sdk/go.mod rename to apps/go-sdk/firecrawl/go.mod index c8a508d6..dbca6187 100644 --- a/apps/go-sdk/go.mod +++ b/apps/go-sdk/firecrawl/go.mod @@ -1,4 +1,4 @@ -module github.com/mendableai/firecrawl/apps/go-sdk +module github.com/mendableai/firecrawl-go go 1.22.5 diff --git a/apps/go-sdk/go.sum b/apps/go-sdk/firecrawl/go.sum similarity index 100% rename from apps/go-sdk/go.sum rename to apps/go-sdk/firecrawl/go.sum