From 5ab61a3d301e3c62eb8cd3263ce52e6307a5141b Mon Sep 17 00:00:00 2001
From: Volker Schukai <volker.schukai@schukai.com>
Date: Sat, 28 Oct 2023 15:19:17 +0200
Subject: [PATCH] fix: update golib #2

---
 .gitlab-ci.yml     |  10 --
 .idea/.gitignore   |   8 +
 .idea/html.iml     |  10 ++
 .idea/markdown.xml |   9 ++
 .idea/misc.xml     |   6 +
 .idea/modules.xml  |   8 +
 .idea/vcs.xml      |   6 +
 CONTRIBUTING.md    |  58 ++++++++
 LICENSE            |  17 ++-
 Taskfile.yml       |  15 +-
 devenv.lock        |  24 +--
 devenv.nix         | 353 +++++++++++++++++++++++++++------------------
 go.sum             |  14 +-
 13 files changed, 355 insertions(+), 183 deletions(-)
 create mode 100644 .idea/.gitignore
 create mode 100644 .idea/html.iml
 create mode 100644 .idea/markdown.xml
 create mode 100644 .idea/misc.xml
 create mode 100644 .idea/modules.xml
 create mode 100644 .idea/vcs.xml
 create mode 100644 CONTRIBUTING.md

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4339280..1bc73eb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,16 +7,12 @@
 
 image: docker-registry.schukai.com:443/nixos-ci-devenv:latest
 
-services:
-  - docker:dind
-
 variables:
   # The repo name as used in
   # https://github.com/nix-community/NUR/blob/master/repos.json
   NIXOS_VERSION: "23.05"
   NIXPKGS_ALLOW_UNFREE: "1"
   NIXPKGS_ALLOW_INSECURE: "1"
-  DOCKER_DRIVER: overlay2
   GIT_DEPTH: 10
 
 stages:
@@ -24,8 +20,6 @@ stages:
   - deploy 
 
 before_script:
-  - nix shell nixpkgs#coreutils-full -c mkdir -p /certs/client/
-  - nix shell nixpkgs#coreutils-full -c ln -fs /etc/ssl/certs/ca-bundle.crt /certs/client/ca.pem
   - echo > .env-gitlab-ci
   - variables=("HOME=$HOME" "CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME" "CI_REPOSITORY_URL=$CI_REPOSITORY_URL" "GITLAB_TOKEN=$GITLAB_TOKEN" "CI_JOB_TOKEN=$CI_JOB_TOKEN" "GITLAB_USER_EMAIL=$GITLAB_USER_EMAIL" "GITLAB_USER_NAME=\"$GITLAB_USER_NAME\"" "CI_REGISTRY_USER=$CI_REGISTRY_USER" "CI_PROJECT_ID=$CI_PROJECT_ID" "CI_PROJECT_DIR=$CI_PROJECT_DIR" "CI_API_V4_URL=$CI_API_V4_URL" "CI_PROJECT_NAME=$CI_PROJECT_NAME" "CI_COMMIT_SHORT_SHA=$CI_COMMIT_SHORT_SHA"); for var in "${variables[@]}"; do echo "$var" >> .env-gitlab-ci; done
   - cat .env-gitlab-ci
@@ -63,7 +57,3 @@ deploy:
       paths:
         - /nix/store
 
-
-  artifacts:
-    paths:
-      - dist   
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/html.iml b/.idea/html.iml
new file mode 100644
index 0000000..25ed3f6
--- /dev/null
+++ b/.idea/html.iml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="Go" enabled="true" />
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>
\ No newline at end of file
diff --git a/.idea/markdown.xml b/.idea/markdown.xml
new file mode 100644
index 0000000..ec0b30f
--- /dev/null
+++ b/.idea/markdown.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="MarkdownSettings">
+    <enabledExtensions>
+      <entry key="MermaidLanguageExtension" value="false" />
+      <entry key="PlantUMLLanguageExtension" value="true" />
+    </enabledExtensions>
+  </component>
+</project>
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..639900d
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectRootManager">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..e5e05d2
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/html.iml" filepath="$PROJECT_DIR$/.idea/html.iml" />
+    </modules>
+  </component>
+</project>
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="Git" />
+  </component>
+</project>
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..2713a85
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,58 @@
+# Contributing to schukai GmbH Projects
+
+## Code of Conduct
+
+Be a human, not an asshole. Common sense and basic human decency apply.
+
+## Getting Started
+
+### Setting up the Project
+
+1. Fork the project on GitLab.
+2. Clone your fork locally. Replace `[your-username]` with your GitLab username and `[project-name]` with the actual project name:
+    ```bash
+    git clone $(git config --get remote.origin.url)
+    ```
+3. Add the upstream repository. Replace `[original-username]` and `[project-name]` with the original repository's username and project name:
+    ```bash
+    git remote add upstream https://gitlab.schukai.com/[original-username]/[project-name].git
+    ```
+
+### Making Changes
+
+1. Create a new branch:
+    ```bash
+    git checkout -b new-feature-branch
+    ```
+2. Make your changes.
+3. Commit your changes:
+    ```bash
+    git commit -m "Description of change"
+    ```
+
+### Submitting a Merge Request
+
+1. Push your changes to your fork:
+    ```bash
+    git push origin new-feature-branch
+    ```
+2. Navigate to the original project repository on `gitlab.schukai.com`.
+3. Open a Merge Request and provide a clear description of the changes.
+
+## Coding Guidelines
+
+- Follow the coding style used in the project.
+- Write unit tests for new features.
+- Ensure that all tests pass before submitting a Merge Request.
+
+## Reporting Issues
+
+If you find an issue, please create a new issue on `gitlab.schukai.com`.
+
+## Additional Resources
+
+- [GitLab Flow](https://docs.gitlab.com/ee/topics/gitlab_flow.html)
+- [GitLab Merge Request Guidelines](https://docs.gitlab.com/ee/user/project/merge_requests/)
+
+Thank you for your contribution! 
+    
diff --git a/LICENSE b/LICENSE
index 89c200e..5694d30 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,7 +1,14 @@
-LICENSE
+Copyright (C) 2023 schukai GmbH 
 
-* All content residing under the "documentation/" directory of this repository is licensed under "Creative Commons: CC BY-SA 4.0 license".
-* All content that resides under the "application/" directory of this repository, if that directory exists, is licensed under the license defined in "application/LICENSE".
-* All third-party components that are integrated into our software are licensed under the original licence provided by the owner of the respective component.
-* Content outside the above directories or restrictions is available under the "AGPL 3.0" licence as defined here: https://www.gnu.org/licenses/agpl-3.0.en.html
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published
+by the Free Software Foundation, either version 3 of the License.
 
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <https://www.gnu.org/licenses/>.  
+    
diff --git a/Taskfile.yml b/Taskfile.yml
index b7313f4..b48a18a 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -10,24 +10,29 @@
 version: '3'
 
 tasks:
-  default:
+  default: 
     cmds:
       - task --list
     silent: true
     
   test:
     desc: Execute unit tests in Go.
+    env:
+      TEST_BY_TASK: true
     cmds:
       - echo "Execute unit tests in Go."
-      - go test -cover -v ./...
-      - go test -bench -v ./...
-      - go test -race -v ./...
+      - gosec .
+      - go test -tags=runOnTask -cover -v ./...
+      - go test -tags=runOnTask -bench -v ./...
+      - go test -tags=runOnTask -race -v ./...
 
   test-fuzz:
     desc: Conduct fuzzing tests.#
+    env:
+      TEST_BY_TASK: true
     cmds:  
       - echo "Conduct fuzzing tests."
-      - go test -v -fuzztime=30s -fuzz=Fuzz ./...
+      - go test -tags=runOnTask -v -fuzztime=30s -fuzz=Fuzz ./...
 
   add-licenses:
     desc: Attach license headers to Go files.
diff --git a/devenv.lock b/devenv.lock
index 8993ca8..a9b3b22 100644
--- a/devenv.lock
+++ b/devenv.lock
@@ -3,11 +3,11 @@
     "devenv": {
       "locked": {
         "dir": "src/modules",
-        "lastModified": 1692003204,
-        "narHash": "sha256-gO2DXwXuArjpywgtRTDb3aKscWMbnI7YwFaqvV46yv0=",
+        "lastModified": 1698243190,
+        "narHash": "sha256-n+SbyNQRhUcaZoU00d+7wi17HJpw/kAUrXOL4zRcqE8=",
         "owner": "cachix",
         "repo": "devenv",
-        "rev": "ade3ae522baf366296598e232b7b063d81740bbb",
+        "rev": "86f476f7edb86159fd20764489ab4e4df6edb4b6",
         "type": "github"
       },
       "original": {
@@ -74,11 +74,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1691950488,
-        "narHash": "sha256-iUNEeudc4dGjx+HsHccnGiuZUVE/nhjXuQ1DVCsHIUY=",
+        "lastModified": 1698288402,
+        "narHash": "sha256-jIIjApPdm+4yt8PglX8pUOexAdEiAax/DXW3S/Mb21E=",
         "owner": "nixos",
         "repo": "nixpkgs",
-        "rev": "720e61ed8de116eec48d6baea1d54469b536b985",
+        "rev": "60b9db998f71ea49e1a9c41824d09aa274be1344",
         "type": "github"
       },
       "original": {
@@ -106,11 +106,11 @@
     },
     "nixpkgs_2": {
       "locked": {
-        "lastModified": 1691950488,
-        "narHash": "sha256-iUNEeudc4dGjx+HsHccnGiuZUVE/nhjXuQ1DVCsHIUY=",
+        "lastModified": 1698288402,
+        "narHash": "sha256-jIIjApPdm+4yt8PglX8pUOexAdEiAax/DXW3S/Mb21E=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "720e61ed8de116eec48d6baea1d54469b536b985",
+        "rev": "60b9db998f71ea49e1a9c41824d09aa274be1344",
         "type": "github"
       },
       "original": {
@@ -130,11 +130,11 @@
         "nixpkgs-stable": "nixpkgs-stable"
       },
       "locked": {
-        "lastModified": 1691747570,
-        "narHash": "sha256-J3fnIwJtHVQ0tK2JMBv4oAmII+1mCdXdpeCxtIsrL2A=",
+        "lastModified": 1698227354,
+        "narHash": "sha256-Fi5H9jbaQLmLw9qBi/mkR33CoFjNbobo5xWdX4tKz1Q=",
         "owner": "cachix",
         "repo": "pre-commit-hooks.nix",
-        "rev": "c5ac3aa3324bd8aebe8622a3fc92eeb3975d317a",
+        "rev": "bd38df3d508dfcdff52cd243d297f218ed2257bf",
         "type": "github"
       },
       "original": {
diff --git a/devenv.nix b/devenv.nix
index efd4d9b..5fdd16f 100644
--- a/devenv.nix
+++ b/devenv.nix
@@ -1,4 +1,4 @@
-{ pkgs, inputs, phps, lib, config, modulesPath, ... }:
+{ pkgs ? import <nixpkgs> {}, inputs, phps, lib, config, modulesPath, ... }:
 
 {
   # https://devenv.sh/packages/
@@ -9,12 +9,14 @@
     blackbox-terminal
     coreutils-full
     dbeaver
+    dbeaver
     delve
     dialog
     drill
     exa
     fd
     fd
+    feh
     gcc12
     gdlv
     git
@@ -23,6 +25,7 @@
     gnumake
     gnused
     go-licenses
+    gosec
     go-task
     gum
     httpie
@@ -34,6 +37,8 @@
     memcached
     netcat
     nixfmt
+    nodePackages.mermaid-cli
+    openssh
     procps
     ranger
     unixtools.xxd
@@ -48,7 +53,7 @@
   languages = { go = { enable = true; }; };
 
   difftastic.enable = true;
-
+  
   scripts.get-go-default-packages.exec = ''
     #!${pkgs.bash}/bin/bash
     echo $(awk -F ' ' '/^module / { print $2 }' go.mod)
@@ -60,7 +65,7 @@
     #!${pkgs.bash}/bin/bash
     #set -euo pipefail
     set -x
-
+    
     PATH="''${PATH}":${pkgs.coreutils}/bin
     PATH="''${PATH}":${pkgs.findutils}/bin
     PATH="''${PATH}":${pkgs.jq}/bin/
@@ -161,142 +166,213 @@
   '';
 
   enterShell = ''
-        
-    cat <<'EOF' > Taskfile.yml
-
-    # THIS FILE IS AUTOGENERATED BY THE DEVENVSHELL
-    # DO NOT EDIT THIS FILE MANUALLY
-    # INSTEAD EDIT THE DEVENVSHELL CONFIGURATION FILE devenv.nix 
-    # AND OPEN A SHELL WITH THE COMMAND devenv shell
-    #
-    # Information about the task runner can be found here:
-    # https://taskfile.dev
-
-    version: '3'
-
-    tasks:
-      default:
-        cmds:
-          - task --list
-        silent: true
-        
-      test:
-        desc: Execute unit tests in Go.
-        cmds:
-          - echo "Execute unit tests in Go."
-          - go test -cover -v ./...
-          - go test -bench -v ./...
-          - go test -race -v ./...
-
-      test-fuzz:
-        desc: Conduct fuzzing tests.#
-        cmds:  
-          - echo "Conduct fuzzing tests."
-          - go test -v -fuzztime=30s -fuzz=Fuzz ./...
-
-      add-licenses:
-        desc: Attach license headers to Go files.
-        cmds:
-          - echo "Attach license headers to Go files."
-          - go install github.com/google/addlicense@latest
-          - addlicense -c "schukai GmbH" -s -l "AGPL-3.0" ./*.go
-        silent: true
-        
-      check-licenses:
-        desc: Check license headers of Go files.
-        silent: true
-        cmds:
-          - go-licenses save "$(get-go-default-packages)"  --ignore "gitlab.schukai.com"  --force --save_path ''${DEVENV_ROOT}/licenses/
-
-      check:
-        desc: Confirm repository status.
-        cmds:
-          - git diff-index --quiet HEAD || (echo "There are uncommitted changes after running make. Please commit or stash them before running make."; exit 1)
-        silent: true
-
-      commit:
-        desc: Commit changes to the repository.
-        aliases:
-          - c
-          - ci
-          - git-commit
-        cmds:
-          - do-git-commit
-    EOF
-
-    cat <<'EOF' > .gitlab-ci.yml
-
-    # THIS FILE IS AUTOGENERATED BY THE DEVENVSHELL
-    # DO NOT EDIT THIS FILE MANUALLY
-    # INSTEAD EDIT THE DEVENVSHELL CONFIGURATION FILE devenv.nix
-    # AND OPEN A SHELL WITH THE COMMAND devenv shell
-    #
-
-    image: docker-registry.schukai.com:443/nixos-ci-devenv:latest
-
-    services:
-      - docker:dind
-
-    variables:
-      # The repo name as used in
-      # https://github.com/nix-community/NUR/blob/master/repos.json
-      NIXOS_VERSION: "23.05"
-      NIXPKGS_ALLOW_UNFREE: "1"
-      NIXPKGS_ALLOW_INSECURE: "1"
-      DOCKER_DRIVER: overlay2
-      GIT_DEPTH: 10
-
-    stages:
-      - test
-      - deploy 
-
-    before_script:
-      - nix shell nixpkgs#coreutils-full -c mkdir -p /certs/client/
-      - nix shell nixpkgs#coreutils-full -c ln -fs /etc/ssl/certs/ca-bundle.crt /certs/client/ca.pem
-      - echo > .env-gitlab-ci
-      - variables=("HOME=$HOME" "CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME" "CI_REPOSITORY_URL=$CI_REPOSITORY_URL" "GITLAB_TOKEN=$GITLAB_TOKEN" "CI_JOB_TOKEN=$CI_JOB_TOKEN" "GITLAB_USER_EMAIL=$GITLAB_USER_EMAIL" "GITLAB_USER_NAME=\"$GITLAB_USER_NAME\"" "CI_REGISTRY_USER=$CI_REGISTRY_USER" "CI_PROJECT_ID=$CI_PROJECT_ID" "CI_PROJECT_DIR=$CI_PROJECT_DIR" "CI_API_V4_URL=$CI_API_V4_URL" "CI_PROJECT_NAME=$CI_PROJECT_NAME" "CI_COMMIT_SHORT_SHA=$CI_COMMIT_SHORT_SHA"); for var in "''${variables[@]}"; do echo "$var" >> .env-gitlab-ci; done
-      - cat .env-gitlab-ci
-
-    after_script:
-      - if [ -f .env-gitlab-ci ]; then rm .env-gitlab-ci; fi
-
-    test:
-      stage: test
-      tags:
-        - nixos
-      script:
-        - devenv shell test-lib
-
-      cache:
-        - key: nixos
-          paths:
-            - /nix/store
-      
-      artifacts:
-        paths:
-          - dist
-
-    deploy:
-      stage: deploy
-      tags:
-        - nixos
-      script:
-        - devenv shell -c deploy-lib
-
-      when: on_success
-
-      cache:
-        - key: nixos
-          paths:
-            - /nix/store
-
-
-      artifacts:
-        paths:
-          - dist   
-    EOF
-
        
+cat <<'EOF' > CONTRIBUTING.md
+# Contributing to schukai GmbH Projects
+
+## Code of Conduct
+
+Be a human, not an asshole. Common sense and basic human decency apply.
+
+## Getting Started
+
+### Setting up the Project
+
+1. Fork the project on GitLab.
+2. Clone your fork locally. Replace `[your-username]` with your GitLab username and `[project-name]` with the actual project name:
+    ```bash
+    git clone $(git config --get remote.origin.url)
+    ```
+3. Add the upstream repository. Replace `[original-username]` and `[project-name]` with the original repository's username and project name:
+    ```bash
+    git remote add upstream https://gitlab.schukai.com/[original-username]/[project-name].git
+    ```
+
+### Making Changes
+
+1. Create a new branch:
+    ```bash
+    git checkout -b new-feature-branch
+    ```
+2. Make your changes.
+3. Commit your changes:
+    ```bash
+    git commit -m "Description of change"
+    ```
+
+### Submitting a Merge Request
+
+1. Push your changes to your fork:
+    ```bash
+    git push origin new-feature-branch
+    ```
+2. Navigate to the original project repository on `gitlab.schukai.com`.
+3. Open a Merge Request and provide a clear description of the changes.
+
+## Coding Guidelines
+
+- Follow the coding style used in the project.
+- Write unit tests for new features.
+- Ensure that all tests pass before submitting a Merge Request.
+
+## Reporting Issues
+
+If you find an issue, please create a new issue on `gitlab.schukai.com`.
+
+## Additional Resources
+
+- [GitLab Flow](https://docs.gitlab.com/ee/topics/gitlab_flow.html)
+- [GitLab Merge Request Guidelines](https://docs.gitlab.com/ee/user/project/merge_requests/)
+
+Thank you for your contribution! 
+    
+EOF
+    
+cat <<'EOF' > LICENSE
+Copyright (C) 2023 schukai GmbH 
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published
+by the Free Software Foundation, either version 3 of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see <https://www.gnu.org/licenses/>.  
+    
+EOF
+ 
+cat <<'EOF' > Taskfile.yml
+
+# THIS FILE IS AUTOGENERATED BY THE DEVENVSHELL
+# DO NOT EDIT THIS FILE MANUALLY
+# INSTEAD EDIT THE DEVENVSHELL CONFIGURATION FILE devenv.nix 
+# AND OPEN A SHELL WITH THE COMMAND devenv shell
+#
+# Information about the task runner can be found here:
+# https://taskfile.dev
+
+version: '3'
+
+tasks:
+  default: 
+    cmds:
+      - task --list
+    silent: true
+    
+  test:
+    desc: Execute unit tests in Go.
+    env:
+      TEST_BY_TASK: true
+    cmds:
+      - echo "Execute unit tests in Go."
+      - gosec .
+      - go test -tags=runOnTask -cover -v ./...
+      - go test -tags=runOnTask -bench -v ./...
+      - go test -tags=runOnTask -race -v ./...
+
+  test-fuzz:
+    desc: Conduct fuzzing tests.#
+    env:
+      TEST_BY_TASK: true
+    cmds:  
+      - echo "Conduct fuzzing tests."
+      - go test -tags=runOnTask -v -fuzztime=30s -fuzz=Fuzz ./...
+
+  add-licenses:
+    desc: Attach license headers to Go files.
+    cmds:
+      - echo "Attach license headers to Go files."
+      - go install github.com/google/addlicense@latest
+      - addlicense -c "schukai GmbH" -s -l "AGPL-3.0" ./*.go
+    silent: true
+    
+  check-licenses:
+    desc: Check license headers of Go files.
+    silent: true
+    cmds:
+      - go-licenses save "$(get-go-default-packages)"  --ignore "gitlab.schukai.com"  --force --save_path ''${DEVENV_ROOT}/licenses/
+
+  check:
+    desc: Confirm repository status.
+    cmds:
+      - git diff-index --quiet HEAD || (echo "There are uncommitted changes after running make. Please commit or stash them before running make."; exit 1)
+    silent: true
+
+  commit:
+    desc: Commit changes to the repository.
+    aliases:
+      - c
+      - ci
+      - git-commit
+    cmds:
+      - do-git-commit
+EOF
+
+cat <<'EOF' > .gitlab-ci.yml
+
+# THIS FILE IS AUTOGENERATED BY THE DEVENVSHELL
+# DO NOT EDIT THIS FILE MANUALLY
+# INSTEAD EDIT THE DEVENVSHELL CONFIGURATION FILE devenv.nix
+# AND OPEN A SHELL WITH THE COMMAND devenv shell
+#
+
+image: docker-registry.schukai.com:443/nixos-ci-devenv:latest
+
+variables:
+  # The repo name as used in
+  # https://github.com/nix-community/NUR/blob/master/repos.json
+  NIXOS_VERSION: "23.05"
+  NIXPKGS_ALLOW_UNFREE: "1"
+  NIXPKGS_ALLOW_INSECURE: "1"
+  GIT_DEPTH: 10
+
+stages:
+  - test
+  - deploy 
+
+before_script:
+  - echo > .env-gitlab-ci
+  - variables=("HOME=$HOME" "CI_COMMIT_REF_NAME=$CI_COMMIT_REF_NAME" "CI_REPOSITORY_URL=$CI_REPOSITORY_URL" "GITLAB_TOKEN=$GITLAB_TOKEN" "CI_JOB_TOKEN=$CI_JOB_TOKEN" "GITLAB_USER_EMAIL=$GITLAB_USER_EMAIL" "GITLAB_USER_NAME=\"$GITLAB_USER_NAME\"" "CI_REGISTRY_USER=$CI_REGISTRY_USER" "CI_PROJECT_ID=$CI_PROJECT_ID" "CI_PROJECT_DIR=$CI_PROJECT_DIR" "CI_API_V4_URL=$CI_API_V4_URL" "CI_PROJECT_NAME=$CI_PROJECT_NAME" "CI_COMMIT_SHORT_SHA=$CI_COMMIT_SHORT_SHA"); for var in "''${variables[@]}"; do echo "$var" >> .env-gitlab-ci; done
+  - cat .env-gitlab-ci
+
+after_script:
+  - if [ -f .env-gitlab-ci ]; then rm .env-gitlab-ci; fi
+
+test:
+  stage: test
+  tags:
+    - nixos
+  script:
+    - devenv shell test-lib
+
+  cache:
+    - key: nixos
+      paths:
+        - /nix/store
+  
+  artifacts:
+    paths:
+      - dist
+
+deploy:
+  stage: deploy
+  tags:
+    - nixos
+  script:
+    - devenv shell -c deploy-lib
+
+  when: on_success
+
+  cache:
+    - key: nixos
+      paths:
+        - /nix/store
+
+EOF
         
   '';
 
@@ -635,4 +711,5 @@
     printLogfileAndExit 0
   '';
 
+
 }
diff --git a/go.sum b/go.sum
index c451ff2..3388289 100644
--- a/go.sum
+++ b/go.sum
@@ -1,10 +1,9 @@
-github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c=
-github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA=
 github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss=
 github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
 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/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -20,10 +19,6 @@ github.com/volker-schukai/tokenizer v1.0.0/go.mod h1:LPw7lLIxUnZgeg96818N7IvwLE1
 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
 gitlab.schukai.com/oss/libraries/go/utilities/data.git v0.2.0 h1:JVxMHiA8zFVjJDhNl65XeYrhdMkzB+5dyrBUEZ982WU=
 gitlab.schukai.com/oss/libraries/go/utilities/data.git v0.2.0/go.mod h1:BsR4Y9jsvISplkW6UoLFRGxQX69/AUmP1SXRwWhx31o=
-gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.4.0 h1:eAEsq3lsHwMe5Zz71vNab5csPtp8S+i5zFPmNnDPFDg=
-gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.4.0/go.mod h1:UvdD4NAf3gLKYafabJD7e9ZCOetzM9JZ9y4GkZukPVU=
-gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.5.2 h1:R+dL2NJCM+AQNPK4DPDmfvx1eomi1Xb1dl0XKEFj7Ek=
-gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.5.2/go.mod h1:UvdD4NAf3gLKYafabJD7e9ZCOetzM9JZ9y4GkZukPVU=
 gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.8.1 h1:A3KvLvu4rV3OstgEn6xHulhQaXawVvzFzbafYHWHUfs=
 gitlab.schukai.com/oss/libraries/go/utilities/pathfinder v0.8.1/go.mod h1:MqCBFv7DXKoBE2rZDc51LGvl2QI7Kz0D+XkQ0izj+ws=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -32,13 +27,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91
 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
 golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
-golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=
-golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
 golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
-golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
 golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
 golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8=
 golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
@@ -47,7 +37,6 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ
 golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -59,7 +48,6 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
 golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
 golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
 golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
-- 
GitLab