Skip to content

Commit

Permalink
Create simple go app
Browse files Browse the repository at this point in the history
  • Loading branch information
rxx committed Mar 30, 2024
1 parent 70e96ea commit 7a0deda
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/go/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin/
6 changes: 6 additions & 0 deletions src/go/app/.replit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
run = "(cd current && just run)"

modules = ["go-1.21:v8-20240329-787bc7d"]

[nix]
channel = "stable-23_11"
3 changes: 3 additions & 0 deletions src/go/app/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module main

go 1.21
5 changes: 5 additions & 0 deletions src/go/app/hello.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package main

func hello() string {
return "Hello from go lib"
}
3 changes: 3 additions & 0 deletions src/go/app/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
run:
go run .

9 changes: 9 additions & 0 deletions src/go/app/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package main

import (
"fmt"
)

func main() {
fmt.Println(hello())
}
6 changes: 6 additions & 0 deletions src/go/app/replit.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{pkgs}: {
deps = [
pkgs.go
pkgs.gopls
];
}

0 comments on commit 7a0deda

Please sign in to comment.