From 5c4dc4d2e5a32180be372b40f5f1aeb48440aa83 Mon Sep 17 00:00:00 2001 From: Abdfn <64256993+abdfnx@users.noreply.github.com> Date: Thu, 10 Aug 2023 11:17:58 +0300 Subject: [PATCH] remove `hostService` parameter --- c.go | 2 +- cpp.go | 2 +- crystal.go | 2 +- csharp.go | 2 +- dart.go | 2 +- deno.go | 2 +- golang.go | 2 +- java.go | 2 +- kotlin.go | 2 +- nim.go | 2 +- nodejs.go | 2 +- php.go | 2 +- python.go | 2 +- ruby.go | 2 +- rust.go | 2 +- swift.go | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/c.go b/c.go index f2f2d24..ebae1d4 100644 --- a/c.go +++ b/c.go @@ -24,7 +24,7 @@ func CRunPsFileContent() string { return Content("run.ps1", "discord-c", "", "") } -func CTemplate(botName, hostService string) { +func CTemplate(botName string) { _, err := looker.LookPath("gcc") if err != nil { diff --git a/cpp.go b/cpp.go index 7ffcff4..5ec6e3c 100644 --- a/cpp.go +++ b/cpp.go @@ -40,7 +40,7 @@ func RunPsFileContent(platform string) string { return Content("run.ps1", "discord-cpp", "", "") } -func CppTemplate(botName, platform, hostService string) { +func CppTemplate(botName, platform string) { _, err := looker.LookPath("gcc") _, cerr := looker.LookPath("cmake") diff --git a/crystal.go b/crystal.go index 7dd5180..6ec326c 100644 --- a/crystal.go +++ b/crystal.go @@ -20,7 +20,7 @@ func ShardFileContent(botName string) string { return Content("shard.yml", "discord-crystal", botName, "") } -func CrystalTemplate(botName, hostService string) { +func CrystalTemplate(botName string) { _, err := looker.LookPath("crystal") shardsPath, serr := looker.LookPath("shards") diff --git a/csharp.go b/csharp.go index 9387566..b51f5df 100644 --- a/csharp.go +++ b/csharp.go @@ -20,7 +20,7 @@ func BotCSharpProj(platform string) string { return Content(platform+"-csharp.csproj", platform+"-csharp", "", "") } -func CsharpTemplate(botName, platform, hostService string) { +func CsharpTemplate(botName, platform string) { dotnetPath, err := looker.LookPath("dotnet") if err != nil { diff --git a/dart.go b/dart.go index 9095f6d..4a7971d 100644 --- a/dart.go +++ b/dart.go @@ -20,7 +20,7 @@ func PubspecFileContent(botName, platform string) string { return Content("pubspec.yaml", platform+"-dart", botName, "") } -func DartTemplate(botName, platform, hostService string) { +func DartTemplate(botName, platform string) { dartPath, err := looker.LookPath("dart") if err != nil { diff --git a/deno.go b/deno.go index 6a40ecf..90604ed 100755 --- a/deno.go +++ b/deno.go @@ -12,7 +12,7 @@ import ( "github.com/abdfnx/looker" ) -func DenoTemplate(botName, platform, hostService string) { +func DenoTemplate(botName, platform string) { deno, err := looker.LookPath("deno") if err != nil { diff --git a/golang.go b/golang.go index bf65205..7b5037e 100644 --- a/golang.go +++ b/golang.go @@ -16,7 +16,7 @@ func MainGoContent(platform string) string { return Content("main.go", platform+"-go", "", "") } -func GoTemplate(botName, platform, hostService string) { +func GoTemplate(botName, platform string) { goPath, err := looker.LookPath("go") if err != nil { diff --git a/java.go b/java.go index fa60167..302ae00 100644 --- a/java.go +++ b/java.go @@ -12,7 +12,7 @@ import ( "github.com/abdfnx/looker" ) -func JavaTemplate(botName, platform, hostService string) { +func JavaTemplate(botName, platform string) { createDirs(botName, "java", platform) gradle, err := looker.LookPath("gradle") diff --git a/kotlin.go b/kotlin.go index a3e28ea..9e55f76 100644 --- a/kotlin.go +++ b/kotlin.go @@ -24,7 +24,7 @@ func SettingsGradleKts() string { return Content("settings.gradle.kts", "discord-kotlin", "", "") } -func KotlinTemplate(botName, platform, hostService string) { +func KotlinTemplate(botName, platform string) { createDirs(botName, "kotlin", platform) gradle, err := looker.LookPath("gradle") diff --git a/nim.go b/nim.go index 5e783cb..b482954 100644 --- a/nim.go +++ b/nim.go @@ -28,7 +28,7 @@ func NimbleFileContent(platform string) string { return Content(platform+"_nim.nimble", platform+"-nim", "", "") } -func NimTemplate(botName, platform, hostService string) { +func NimTemplate(botName, platform string) { _, err := looker.LookPath("nim") nimblePath, nerr := looker.LookPath("nimble") diff --git a/nodejs.go b/nodejs.go index d3e7aff..5a31362 100644 --- a/nodejs.go +++ b/nodejs.go @@ -28,7 +28,7 @@ func MainTSContent(platform string) string { return Content("main.ts", platform+"-nodejs-ts", "", "") } -func NodejsTemplate(botName, pm, platform, hostService string, isTs bool) { +func NodejsTemplate(botName, pm, platform string, isTs bool) { _, nerr := looker.LookPath("npm") pmPath, err := looker.LookPath(pm) diff --git a/php.go b/php.go index 45f2578..55a595c 100644 --- a/php.go +++ b/php.go @@ -24,7 +24,7 @@ func ComposerFileContent(botName, platform string) string { return Content("composer.json", platform+"-php", botName, "") } -func PHPTemplate(botName, platform, hostService string) { +func PHPTemplate(botName, platform string) { _, err := looker.LookPath("php") composerPath, serr := looker.LookPath("composer") diff --git a/python.go b/python.go index 011aefb..fbc9f29 100644 --- a/python.go +++ b/python.go @@ -24,7 +24,7 @@ func PyProjectContent(botName string) string { return Content("pyproject.toml", "discord-python", botName, "") } -func PythonTemplate(botName, platform, pm, hostService string) { +func PythonTemplate(botName, platform, pm string) { pip := "pip3" pythonPath := "python3" diff --git a/ruby.go b/ruby.go index 4a5ccb8..3f9fbe5 100644 --- a/ruby.go +++ b/ruby.go @@ -16,7 +16,7 @@ func MainRbContent(platform string) string { return Content("main.rb", platform+"-ruby", "", "") } -func RubyTemplate(botName, platform, hostService string) { +func RubyTemplate(botName, platform string) { _, err := looker.LookPath("ruby") bundlePath, berr := looker.LookPath("bundle") diff --git a/rust.go b/rust.go index e493567..3e4fc5c 100644 --- a/rust.go +++ b/rust.go @@ -20,7 +20,7 @@ func CargoFileContent(botName, platform string) string { return Content("Cargo.toml", platform+"-rust", botName, "") } -func RustTemplate(botName, platform, pm, hostService string) { +func RustTemplate(botName, platform, pm string) { _, err := looker.LookPath("cargo") pmPath, perr := looker.LookPath(pm) diff --git a/swift.go b/swift.go index e549b04..af73670 100644 --- a/swift.go +++ b/swift.go @@ -24,7 +24,7 @@ func PackageSwiftFileContent(botName, platform string) string { return Content("Package.swift", platform+"-swift", botName, "") } -func SwiftTemplate(botName, platform, hostService string) { +func SwiftTemplate(botName, platform string) { swiftPath, err := looker.LookPath("swift") if err := os.Mkdir(filepath.Join(botName, "Sources"), os.ModePerm); err != nil {