-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from create-go-app/dev
Fix golangci-lint issues
- Loading branch information
Showing
18 changed files
with
74 additions
and
272 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# These are supported funding model platforms | ||
|
||
github: koddr | ||
patreon: koddr | ||
custom: https://paypal.me/koddr |
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,22 @@ | ||
name: Linting | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
golangci: | ||
name: Linting Go code | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: latest |
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 |
---|---|---|
|
@@ -187,7 +187,7 @@ | |
same "printed page" as the copyright notice for easier | ||
identification within third-party archives. | ||
|
||
Copyright 2019-present Vic Shóstak <[email protected]> (https://1wa.co) | ||
Copyright 2019-present Vic Shóstak <[email protected]> (https://shostak.dev) | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
|
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 |
---|---|---|
@@ -1,27 +1,7 @@ | ||
/* | ||
Package cmd includes all of the Create Go App CLI commands. | ||
// Copyright 2019-present Vic Shóstak. All rights reserved. | ||
// Use of this source code is governed by Apache 2.0 license | ||
// that can be found in the LICENSE file. | ||
|
||
Create a new production-ready project with backend (Golang), | ||
frontend (JavaScript, TypeScript) and deploy automation | ||
(Ansible, Docker) by running one CLI command. | ||
-> Focus on writing code and thinking of business logic! | ||
<- The Create Go App CLI will take care of the rest. | ||
Copyright © 2019-present Vic Shóstak <[email protected]> (https://1wa.co) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
package cmd | ||
|
||
import ( | ||
|
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 |
---|---|---|
@@ -1,27 +1,7 @@ | ||
/* | ||
Package cmd includes all of the Create Go App CLI commands. | ||
// Copyright 2019-present Vic Shóstak. All rights reserved. | ||
// Use of this source code is governed by Apache 2.0 license | ||
// that can be found in the LICENSE file. | ||
|
||
Create a new production-ready project with backend (Golang), | ||
frontend (JavaScript, TypeScript) and deploy automation | ||
(Ansible, Docker) by running one CLI command. | ||
-> Focus on writing code and thinking of business logic! | ||
<- The Create Go App CLI will take care of the rest. | ||
Copyright © 2019-present Vic Shóstak <[email protected]> (https://1wa.co) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
package cmd | ||
|
||
import ( | ||
|
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 |
---|---|---|
@@ -1,27 +1,7 @@ | ||
/* | ||
Package cmd includes all of the Create Go App CLI commands. | ||
// Copyright 2019-present Vic Shóstak. All rights reserved. | ||
// Use of this source code is governed by Apache 2.0 license | ||
// that can be found in the LICENSE file. | ||
|
||
Create a new production-ready project with backend (Golang), | ||
frontend (JavaScript, TypeScript) and deploy automation | ||
(Ansible, Docker) by running one CLI command. | ||
-> Focus on writing code and thinking of business logic! | ||
<- The Create Go App CLI will take care of the rest. | ||
Copyright © 2019-present Vic Shóstak <[email protected]> (https://1wa.co) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
package cmd | ||
|
||
import ( | ||
|
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 |
---|---|---|
@@ -1,27 +1,7 @@ | ||
/* | ||
Package cmd includes all of the Create Go App CLI commands. | ||
// Copyright 2019-present Vic Shóstak. All rights reserved. | ||
// Use of this source code is governed by Apache 2.0 license | ||
// that can be found in the LICENSE file. | ||
|
||
Create a new production-ready project with backend (Golang), | ||
frontend (JavaScript, TypeScript) and deploy automation | ||
(Ansible, Docker) by running one CLI command. | ||
-> Focus on writing code and thinking of business logic! | ||
<- The Create Go App CLI will take care of the rest. | ||
Copyright © 2019-present Vic Shóstak <[email protected]> (https://1wa.co) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
package cmd | ||
|
||
import ( | ||
|
@@ -35,15 +15,15 @@ import ( | |
) | ||
|
||
var ( | ||
useConfigFile bool // indicate using config (from $PWD/.cgapp.yml) | ||
projectConfig map[string]interface{} // parse project config | ||
rolesConfig map[string]interface{} // parse Ansible roles config | ||
backend, frontend, webserver, database string // define project variables | ||
installAnsibleRoles, askBecomePass bool // install Ansible roles, ask become pass | ||
username, host, network, port string // define deploy variables | ||
playbook string = "deploy-playbook.yml" // default Ansible playbook | ||
createAnswers registry.CreateAnswers // define answers variable for `create` command | ||
deployAnswers registry.DeployAnswers // define answers variable for `deploy` command | ||
useConfigFile bool // indicate using config (from $PWD/.cgapp.yml) | ||
projectConfig map[string]interface{} // parse project config | ||
rolesConfig map[string]interface{} // parse Ansible roles config | ||
backend, frontend, webserver string // define project variables | ||
installAnsibleRoles, askBecomePass bool // install Ansible roles, ask become pass | ||
username, host, network, port string // define deploy variables | ||
playbook string = "deploy-playbook.yml" // default Ansible playbook | ||
createAnswers registry.CreateAnswers // define answers variable for `create` command | ||
deployAnswers registry.DeployAnswers // define answers variable for `deploy` command | ||
|
||
// Config for survey icons and colors. | ||
// See: https://github.com/mgutz/ansi#style-format | ||
|
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ frontend (JavaScript, TypeScript) and deploy automation | |
A helpful documentation and next steps -> https://create-go.app/ | ||
Copyright © 2019-present Vic Shóstak <[email protected]> (https://1wa.co) | ||
Copyright (c) 2019-present Vic Shóstak <[email protected]> (https://shostak.dev) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
|
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 |
---|---|---|
@@ -1,29 +1,7 @@ | ||
/* | ||
Package cgapp includes a powerful CLI for the Create Go App project. | ||
// Copyright 2019-present Vic Shóstak. All rights reserved. | ||
// Use of this source code is governed by Apache 2.0 license | ||
// that can be found in the LICENSE file. | ||
|
||
Create a new production-ready project with backend (Golang), | ||
frontend (JavaScript, TypeScript) and deploy automation | ||
(Ansible, Docker) by running one CLI command. | ||
-> Focus on writing code and thinking of business logic! | ||
<- The Create Go App CLI will take care of the rest. | ||
A helpful documentation and next steps -> https://create-go.app/ | ||
Copyright © 2019-present Vic Shóstak <[email protected]> (https://1wa.co) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
package cgapp | ||
|
||
import ( | ||
|
@@ -121,14 +99,12 @@ func CreateProjectFromCmd(p *registry.Project, c map[string]*registry.Command, m | |
if len(project) > 1 { | ||
options = []string{create, folder, args["template"], "cra-template-" + project[1]} | ||
} | ||
break | ||
case "preact": | ||
// preact create [template] [dest] [args...] | ||
options = []string{create, "default", p.Type, args["cwd"], p.RootFolder, args["name"], "cgapp"} | ||
if len(project) > 1 { | ||
options = []string{create, project[1], p.Type, args["cwd"], p.RootFolder, args["name"], "cgapp"} | ||
} | ||
break | ||
case "vue": | ||
// vue create [options] <app-name> | ||
options = []string{create, "--default", "--bare", p.Type} | ||
|
@@ -138,22 +114,18 @@ func CreateProjectFromCmd(p *registry.Project, c map[string]*registry.Command, m | |
if len(project) == 3 { | ||
options = []string{create, "--preset", project[1] + ":" + project[2], "--bare", "--clone", p.Type} | ||
} | ||
break | ||
case "angular": | ||
// ng new <app-name> [options] | ||
options = []string{create, "cgapp", "--defaults", "--routing", "--directory", p.Type} | ||
break | ||
case "svelte": | ||
// npx degit [template] [dest] | ||
options = []string{create, args["template"], folder} | ||
break | ||
case "sapper": | ||
// npx degit [template] [dest] | ||
options = []string{create, args["template"] + "#rollup", folder} | ||
if len(project) > 1 { | ||
options = []string{create, args["template"] + "#" + project[1], folder} | ||
} | ||
break | ||
} | ||
|
||
// Run execution command. | ||
|
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 |
---|---|---|
@@ -1,29 +1,7 @@ | ||
/* | ||
Package cgapp includes a powerful CLI for the Create Go App project. | ||
// Copyright 2019-present Vic Shóstak. All rights reserved. | ||
// Use of this source code is governed by Apache 2.0 license | ||
// that can be found in the LICENSE file. | ||
|
||
Create a new production-ready project with backend (Golang), | ||
frontend (JavaScript, TypeScript) and deploy automation | ||
(Ansible, Docker) by running one CLI command. | ||
-> Focus on writing code and thinking of business logic! | ||
<- The Create Go App CLI will take care of the rest. | ||
A helpful documentation and next steps -> https://create-go.app/ | ||
Copyright © 2019-present Vic Shóstak <[email protected]> (https://1wa.co) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
package cgapp | ||
|
||
import ( | ||
|
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 |
---|---|---|
@@ -1,29 +1,7 @@ | ||
/* | ||
Package cgapp includes a powerful CLI for the Create Go App project. | ||
// Copyright 2019-present Vic Shóstak. All rights reserved. | ||
// Use of this source code is governed by Apache 2.0 license | ||
// that can be found in the LICENSE file. | ||
|
||
Create a new production-ready project with backend (Golang), | ||
frontend (JavaScript, TypeScript) and deploy automation | ||
(Ansible, Docker) by running one CLI command. | ||
-> Focus on writing code and thinking of business logic! | ||
<- The Create Go App CLI will take care of the rest. | ||
A helpful documentation and next steps -> https://create-go.app/ | ||
Copyright © 2019-present Vic Shóstak <[email protected]> (https://1wa.co) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
package cgapp | ||
|
||
import ( | ||
|
Oops, something went wrong.