Alter 9 files

Update `go.mod`
Delete `README.md`
Add `cookiecutter.json`
Add `local_extensions.py`
Add `README.md`
Rename `challenge.go` to `challenge.go`
Rename `info.json` to `info.json`
Rename `challenge.nim` to `challenge.nim`
Rename `__init__.py` to `__init__.py`
This commit is contained in:
akp 2022-11-27 02:08:08 +00:00
parent f7b2337886
commit 23696d3877
No known key found for this signature in database
GPG key ID: AA5726202C8879B7
9 changed files with 30 additions and 5 deletions

2
go.mod
View file

@ -1,6 +1,6 @@
module github.com/codemicro/adventOfCode module github.com/codemicro/adventOfCode
go 1.17 go 1.19
require ( require (
github.com/AlecAivazis/survey/v2 v2.3.2 github.com/AlecAivazis/survey/v2 v2.3.2

View file

@ -1,2 +0,0 @@
# [Day <n>: <Day Title>](https://adventofcode.com/<year>/day/<n>)

View file

@ -0,0 +1,12 @@
{
"_extensions": ["local_extensions.camel_case"],
"year": 2022,
"dayNumber": 1,
"challengeTitle": null,
"__formattedTitle": "{{ cookiecutter.challengeTitle | title }}",
"__camelTitle": "{{ cookiecutter.challengeTitle | camel_case }}",
"__formattedDayNumber": "{{ '%02d' | format(cookiecutter.dayNumber|int) }}"
}

View file

@ -0,0 +1,14 @@
from cookiecutter.utils import simple_filter
@simple_filter
def camel_case(v):
res = v.split(" ")
for i in range(len(res)):
f = lambda x: x.upper()
if i == 0:
f = lambda x: x.lower()
res[i] = f(res[i][0]) + res[i][1:]
return "".join(res)

View file

@ -0,0 +1 @@
# [Day {{ cookiecutter.dayNumber }}: {{ cookiecutter.__formattedTitle }}](https://adventofcode.com/{{ cookiecutter.year }}/day/{{ cookiecutter.dayNumber }})

View file

@ -6,10 +6,10 @@ type Challenge struct {
aocgo.BaseChallenge aocgo.BaseChallenge
} }
func (c Challenge) One(instr string) (interface{}, error) { func (c Challenge) One(instr string) (any, error) {
return nil, nil return nil, nil
} }
func (c Challenge) Two(instr string) (interface{}, error) { func (c Challenge) Two(instr string) (any, error) {
return nil, nil return nil, nil
} }