From a51d54f05b189f8e35529aaef9c71b3b339c6414 Mon Sep 17 00:00:00 2001 From: Torsten Date: Mon, 22 Jan 2024 11:18:44 +0100 Subject: [PATCH] ... --- MyObsidianVault/.obsidian/workspace.json | 98 ++++--------------- .../Auto updater in Go.md | 37 +++++++ 2 files changed, 58 insertions(+), 77 deletions(-) create mode 100644 MyObsidianVault/AWA/02_Running the binaries/Auto updater in Go.md diff --git a/MyObsidianVault/.obsidian/workspace.json b/MyObsidianVault/.obsidian/workspace.json index daf34fc..ddaf105 100644 --- a/MyObsidianVault/.obsidian/workspace.json +++ b/MyObsidianVault/.obsidian/workspace.json @@ -1,23 +1,19 @@ { "main": { - "id": "fbf4a718f13ee17d", + "id": "50c2fba946caf735", "type": "split", "children": [ { - "id": "9cff64791455f584", + "id": "dae9af517526e8ac", "type": "tabs", "children": [ { - "id": "1fc1ac9fc01290be", + "id": "ead58bf623196751", "type": "leaf", "state": { "type": "markdown", "state": { -<<<<<<< HEAD - "file": "AWA/Blender/AutoRigPro/01 Smart Rig Creation.md", -======= - "file": "AWA/01_AWS Access/Autostart AWA Servers on instance startup.md", ->>>>>>> fb07057 (...) + "file": "AWA/02_Running the binaries/Auto updater in Go.md", "mode": "source", "source": false } @@ -29,15 +25,15 @@ "direction": "vertical" }, "left": { - "id": "a7b36e6781d160a5", + "id": "89e81ce4c22ed5e5", "type": "split", "children": [ { - "id": "daa4eebd8ab2ce0e", + "id": "f6c704b5001e0625", "type": "tabs", "children": [ { - "id": "0fa2ff500a2e0a35", + "id": "a236695ac8f73ffd", "type": "leaf", "state": { "type": "file-explorer", @@ -47,7 +43,7 @@ } }, { - "id": "96923d57d0ae6217", + "id": "b8eee2048962cc47", "type": "leaf", "state": { "type": "search", @@ -62,7 +58,7 @@ } }, { - "id": "1947a3109ed6ab82", + "id": "123ccadfa6165a9c", "type": "leaf", "state": { "type": "bookmarks", @@ -73,27 +69,23 @@ } ], "direction": "horizontal", - "width": 354.5 + "width": 300 }, "right": { - "id": "90b2114f7117b8d1", + "id": "1cc7b16bdc8ff3d5", "type": "split", "children": [ { - "id": "c2252474d866816b", + "id": "898028b46c85c825", "type": "tabs", "children": [ { - "id": "6b23949b3014fa54", + "id": "88e875295c6e8e57", "type": "leaf", "state": { "type": "backlink", "state": { -<<<<<<< HEAD - "file": "AWA/Blender/AutoRigPro/01 Smart Rig Creation.md", -======= - "file": "AWA/01_AWS Access/Autostart AWA Servers on instance startup.md", ->>>>>>> fb07057 (...) + "file": "AWA/02_Running the binaries/Auto updater in Go.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -105,23 +97,19 @@ } }, { - "id": "16021e7aa15825b5", + "id": "5cbdf8cd9df7d127", "type": "leaf", "state": { "type": "outgoing-link", "state": { -<<<<<<< HEAD - "file": "AWA/Blender/AutoRigPro/01 Smart Rig Creation.md", -======= - "file": "AWA/01_AWS Access/Autostart AWA Servers on instance startup.md", ->>>>>>> fb07057 (...) + "file": "AWA/02_Running the binaries/Auto updater in Go.md", "linksCollapsed": false, "unlinkedCollapsed": true } } }, { - "id": "5ab0dbb4d43cd129", + "id": "944be67e58072832", "type": "leaf", "state": { "type": "tag", @@ -132,16 +120,12 @@ } }, { - "id": "618fface621d3eb5", + "id": "8f501cd9d271b189", "type": "leaf", "state": { "type": "outline", "state": { -<<<<<<< HEAD - "file": "AWA/Blender/AutoRigPro/01 Smart Rig Creation.md" -======= - "file": "AWA/01_AWS Access/Autostart AWA Servers on instance startup.md" ->>>>>>> fb07057 (...) + "file": "AWA/02_Running the binaries/Auto updater in Go.md" } } } @@ -163,48 +147,8 @@ "obsidian-excalidraw-plugin:Create new drawing": false } }, - "active": "1fc1ac9fc01290be", + "active": "ead58bf623196751", "lastOpenFiles": [ -<<<<<<< HEAD - "AWA/Blender/_Workbench/Naming conventions avatar blendfile versions.md", -======= - "Pasted image 20240121135842.png", - "AWA/01_AWS Access/Install crontab.md", - "AWA/01_AWS Access/Autostart AWA Servers on instance startup.md", ->>>>>>> fb07057 (...) - "AWA/Godot/Godot World Environment Node (2D).md", - "AWA/Godot/Advanced Getters and Setters, useage of @tool.md", - "TestFolder/Drawing 2023-08-01 15.05.05.excalidraw.md", - "AWA/Godot", - "TestFolder/Drawing 2023-08-01 15.08.23.excalidraw.md", - "AWA/zz_useful_Youtube_tutorials.md", - "AWA/01_AWS Access/AWS Server Setup + Access.md", - "AWA/01_AWS Access/Lambda functions.md", - "AWA/01_AWS Access/Setup role for lambda function.md", - "AWA/Blender/AutoRigPro/02 Transfer animations.md", - "AWA/Blender/_Workbench", - "AWA/Blender/AutoRigPro/01 Smart Rig Creation.md", - "AWA/02_Running the binaries/Runtime Parameters.md", - "AWA/Struktur.md", - "AWA/02_Running the binaries", - "AWA/Blender/Cut mesh.md", - "AWA/Blender/AutoRigPro/02 Transfer animations", - "AWA/Blender/Courses/Node School on YT.md", - "AWA/Blender/AutoRigPro", - "AWA/Blender/Separate Selection into distinct object.md", - "AWA/Blender/Courses", - "AWA/Blender/Extend current selection.md", - "AWA/Blender/Dissolve Edges.md", - "AWA/Blender/Move Selection to new Collection.md", - "AWA/01_AWS Access", - "Setup", - "AWA/00_Concepts/AWA Tools.md", - "TestFolder/fun.md", - "AWA/00_Concepts/AWA C4 System Context.md", - "AWA/00_Concepts/AWA High Level Concept.md", - "Pasted Image 20231220120453_683.jpg", - "AWA/00_Concepts", - "AWA/Blender", - "Untitled.canvas" + "AWA/02_Running the binaries/Auto updater in Go.md" ] } \ No newline at end of file diff --git a/MyObsidianVault/AWA/02_Running the binaries/Auto updater in Go.md b/MyObsidianVault/AWA/02_Running the binaries/Auto updater in Go.md new file mode 100644 index 0000000..a5d0bd9 --- /dev/null +++ b/MyObsidianVault/AWA/02_Running the binaries/Auto updater in Go.md @@ -0,0 +1,37 @@ +````go +package main + + + +import ( +"fmt" +"io/ioutil" +"net/http" +) + +func main() { + url := "https://www.zauberturm.de/Downloads/demo.txt" + // Make a GET request to the URL + response, err := http.Get(url) + if err != nil { + fmt.Println("Error making GET request:", err) + return + } + defer response.Body.Close() + // Check if the response status code is OK (200) + if response.StatusCode != http.StatusOK { + fmt.Println("Error: Unexpected status code", response.StatusCode) + return +} + +// Read the content of the response body +body, err := ioutil.ReadAll(response.Body) +if err != nil { + fmt.Println("Error reading response body:", err) +return +} + +// Display the content of the downloaded file + fmt.Println(string(body)) +} +``` \ No newline at end of file