From 8fa3cccf07b2adbad6536aa59792db08167a1733 Mon Sep 17 00:00:00 2001 From: Steve Kallestad Date: Fri, 6 Jan 2023 14:42:05 -0800 Subject: [PATCH] change util.format to templated strings --- src/helpers.ts | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/helpers.ts b/src/helpers.ts index be1da93..453ee2b 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -12,26 +12,14 @@ export function getKubectlArch(): string { export function getkubectlDownloadURL(version: string, arch: string): string { switch (os.type()) { case 'Linux': - return util.format( - 'https://dl.k8s.io/release/v%s/bin/linux/%s/kubectl', - version, - arch - ) + return `https://dl.k8s.io/release/v${version}/bin/linux/${arch}/kubectl` case 'Darwin': - return util.format( - 'https://dl.k8s.io/release/v%s/bin/darwin/%s/kubectl', - version, - arch - ) + return `https://dl.k8s.io/release/v${version}/bin/darwin/${arch}/kubectl` case 'Windows_NT': default: - return util.format( - 'https://dl.k8s.io/release/v%s/bin/windows/%s/kubectl.exe', - version, - arch - ) + return `https://dl.k8s.io/release/v${version}/bin/windows/${arch}/kubectl.exe` } }