From 912ad7d22c04747f88fa2cfa106c642381f7da37 Mon Sep 17 00:00:00 2001 From: nqkhanh2003 Date: Mon, 23 Sep 2024 22:52:53 +0700 Subject: [PATCH] first commit --- .idea/.gitignore | 8 ++++++++ .idea/modules.xml | 8 ++++++++ .idea/url-shortener.iml | 9 +++++++++ .idea/vcs.xml | 6 ++++++ go.mod | 1 + main.go | 25 +++++++++++++++++++++++++ 6 files changed, 57 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/modules.xml create mode 100644 .idea/url-shortener.iml create mode 100644 .idea/vcs.xml create mode 100644 go.mod create mode 100644 main.go 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/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..f678fc4 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/url-shortener.iml b/.idea/url-shortener.iml new file mode 100644 index 0000000..5e764c4 --- /dev/null +++ b/.idea/url-shortener.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..7629614 --- /dev/null +++ b/go.mod @@ -0,0 +1 @@ +module url-shortener diff --git a/main.go b/main.go new file mode 100644 index 0000000..2486a81 --- /dev/null +++ b/main.go @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" +) + +//TIP To run your code, right-click the code and select Run. Alternatively, click +// the icon in the gutter and select the Run menu item from here. + +func main() { + //TIP Press when your caret is at the underlined or highlighted text + // to see how GoLand suggests fixing it. + s := "gopher" + fmt.Println("Hello and welcome, %s!", s) + + for i := 1; i <= 5; i++ { + //TIP You can try debugging your code. We have set one breakpoint + // for you, but you can always add more by pressing . To start your debugging session, + // right-click your code in the editor and select the Debug option. + fmt.Println("i =", 100/i) + } +} + +//TIP See GoLand help at jetbrains.com/help/go/. +// Also, you can try interactive lessons for GoLand by selecting 'Help | Learn IDE Features' from the main menu.