-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Programming exercises: Add Go programming language template (#9751)
- Loading branch information
Showing
46 changed files
with
812 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ public enum ProgrammingLanguage { | |
C, | ||
C_PLUS_PLUS, | ||
C_SHARP, | ||
GO, | ||
HASKELL, | ||
JAVA, | ||
JAVASCRIPT, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
export AEOLUS_INITIAL_DIRECTORY=${PWD} | ||
build () { | ||
echo '⚙️ executing build' | ||
cd "${testWorkingDirectory}" | ||
go test -c -o /dev/null ./... | ||
|
||
} | ||
|
||
test () { | ||
echo '⚙️ executing test' | ||
cd "${testWorkingDirectory}" | ||
go test ./... -json 2>&1 | go-junit-report -parser gojson -out test-results.xml | ||
|
||
} | ||
|
||
main () { | ||
if [[ "${1}" == "aeolus_sourcing" ]]; then | ||
return 0 # just source to use the methods in the subshell, no execution | ||
fi | ||
local _script_name | ||
_script_name=${BASH_SOURCE[0]:-$0} | ||
cd "${AEOLUS_INITIAL_DIRECTORY}" | ||
bash -c "source ${_script_name} aeolus_sourcing; build" | ||
cd "${AEOLUS_INITIAL_DIRECTORY}" | ||
bash -c "source ${_script_name} aeolus_sourcing; test" | ||
} | ||
|
||
main "${@}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
api: v0.0.1 | ||
metadata: | ||
name: "Go" | ||
id: Go | ||
actions: | ||
- name: build | ||
script: | | ||
cd "${testWorkingDirectory}" | ||
go test -c -o /dev/null ./... | ||
- name: test | ||
script: | | ||
cd "${testWorkingDirectory}" | ||
go test ./... -json 2>&1 | go-junit-report -parser gojson -out test-results.xml | ||
results: | ||
- name: Go Test Results | ||
path: "${testWorkingDirectory}/test-results.xml" | ||
type: junit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package ${packageName} | ||
|
||
type BubbleSort struct{} | ||
|
||
func NewBubbleSort() *BubbleSort { | ||
panic("not implemented") | ||
} |
Oops, something went wrong.