From a760bf50dbf0fa917f73deb55882659038acd985 Mon Sep 17 00:00:00 2001 From: John Kjell Date: Sun, 29 Oct 2023 01:34:57 -0500 Subject: [PATCH] Add external dependency and resolve GHA warnings Signed-off-by: John Kjell --- .github/workflows/witness.yml | 8 ++++---- go.mod | 2 ++ go.sum | 2 ++ main.go | 7 ++++--- main_test.go | 2 +- 5 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 go.sum diff --git a/.github/workflows/witness.yml b/.github/workflows/witness.yml index 1a43ffb..e95b273 100644 --- a/.github/workflows/witness.yml +++ b/.github/workflows/witness.yml @@ -44,13 +44,13 @@ jobs: witness: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.1 - - uses: actions/setup-go@v4.1.0 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 with: go-version: 1.21.x - if: ${{ inputs.artifact-download != '' }} - uses: actions/download-artifact@v3.0.0 + uses: actions/download-artifact@v3 with: name: ${{ inputs.artifact-download }} path: /tmp @@ -74,7 +74,7 @@ jobs: run: ${{ inputs.command }} - if: ${{ inputs.artifact-upload-path != '' && inputs.artifact-upload-name != ''}} - uses: actions/upload-artifact@v3.0.0 + uses: actions/upload-artifact@v3 with: name: ${{ inputs.artifact-upload-name }} path: ${{ inputs.artifact-upload-path }} diff --git a/go.mod b/go.mod index 7d2b765..a5aa07a 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module github.com/jkjell/swf go 1.21.1 + +require github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..6e66712 --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be h1:J5BL2kskAlV9ckgEsNQXscjIaLiOYiZ75d4e94E6dcQ= +github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be/go.mod h1:mk5IQ+Y0ZeO87b858TlA645sVcEcbiX6YqP98kt+7+w= diff --git a/main.go b/main.go index 2834665..c01c1e0 100644 --- a/main.go +++ b/main.go @@ -1,13 +1,14 @@ package main import ( - "fmt" + "github.com/common-nighthawk/go-figure" ) func Hello() string { - return "Hello World!" + return "Hello KubeCon!" } func main() { - fmt.Println(Hello()) + myFigure := figure.NewFigure(Hello(), "usaflag", true) + myFigure.Print() } diff --git a/main_test.go b/main_test.go index 3304e36..247d2dd 100644 --- a/main_test.go +++ b/main_test.go @@ -6,7 +6,7 @@ import ( func TestHello(t *testing.T) { got := Hello() - want := "Hello World!" + want := "Hello KubeCon!" if got != want { t.Errorf("got %q want %q", got, want)