ROOTPLOIT
Server: LiteSpeed
System: Linux in-mum-web1878.main-hosting.eu 5.14.0-570.21.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 11 07:22:35 EDT 2025 x86_64
User: u435929562 (435929562)
PHP: 7.4.33
Disabled: system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/go/pkg/mod/github.com/hashicorp/[email protected]/.circleci/config.yml
version: 2.1

references:
  images:
    go: &GOLANG_IMAGE docker.mirror.hashicorp.services/circleci/golang:1.15.3

# reusable 'executor' object for jobs
executors:
  go:
    docker:
      - image: *GOLANG_IMAGE
    environment:
      - TEST_RESULTS: /tmp/test-results # path to where test results are saved

jobs:
  go-fmt-and-vet:
    executor: go
    steps:
      - checkout

      # Restore go module cache if there is one
      - restore_cache:
          keys:
            - go-immutable-radix-modcache-v1-{{ checksum "go.mod" }}

      - run: go mod download

      # Save go module cache if the go.mod file has changed
      - save_cache:
          key: go-immutable-radix-modcache-v1-{{ checksum "go.mod" }}
          paths:
            - "/go/pkg/mod"

      # check go fmt output because it does not report non-zero when there are fmt changes
      - run:
          name: check go fmt
          command: |
            files=$(go fmt ./...)
            if [ -n "$files" ]; then
              echo "The following file(s) do not conform to go fmt:"
              echo "$files"
              exit 1
            fi
      - run: go vet ./...

  go-test:
    executor: go
    steps:
      - checkout
      - run: mkdir -p $TEST_RESULTS

      - restore_cache: # restore cache from dev-build job
          keys:
            - go-immutable-radix-modcache-v1-{{ checksum "go.mod" }}

      # run go tests with gotestsum
      - run: |
          PACKAGE_NAMES=$(go list ./...)
          gotestsum --format=short-verbose --junitfile $TEST_RESULTS/gotestsum-report.xml -- $PACKAGE_NAMES
      - store_test_results:
          path: /tmp/test-results
      - store_artifacts:
          path: /tmp/test-results

workflows:
  version: 2
  test-and-build:
    jobs:
      - go-fmt-and-vet
      - go-test:
          requires:
            - go-fmt-and-vet