File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
redhat/roles/configure/tasks Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 20
20
- " ../../../../templates/*"
21
21
become : true
22
22
23
+ - name : Run go mod init
24
+ shell : cd /home/ec2-user/templates && go mod init home/ec2-user/templates
25
+ become : true
26
+
27
+ - name : Run go mod tidy
28
+ shell : cd /home/ec2-user/templates && go mod tidy
29
+ become : true
30
+
31
+ - name : Change Permissions for /home/ec2-user/templates
32
+ shell : chown -R ec2-user:ec2-user /home/ec2-user/templates/ && chmod -R 755 /home/ec2-user/templates
33
+ become : true
34
+
23
35
# Use the below command to run it locally
24
36
# - name: Run sample go application
25
37
# ansible.builtin.shell: cd ~/templates && go build . && nohup ./gosampleapp &
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ func main() {
14
14
go client ()
15
15
16
16
//codeSnippet
17
+
18
+
17
19
transactions := make (chan string )
18
20
19
21
go func () {
@@ -26,6 +28,9 @@ func main() {
26
28
}()
27
29
28
30
//routerSnippet
31
+
32
+
33
+
29
34
router .GET ("/transaction" , func (c * gin.Context ) {
30
35
transaction := <- transactions
31
36
c .JSON (200 , gin.H {
You can’t perform that action at this time.
0 commit comments