Last change
on this file since 12 was 10, checked in by fattalion, 3 years ago |
Make some identifiers more concise
See https://go.dev/doc/effective_go#package-names, specifically:
The importer of a package will use the name to refer to its contents,
so exported names in the package can use that fact to avoid
repetition.
For example, engines.GoogleTranslateEngine needlessly repeats
"engine," so just get rid of that duplication by renaming it to
engines.GoogleTranslate .
Renaming engines.TranslationEngine to engines.Engine may be
debatable, so if somebody disagrees, feel free to leave a comment
stating your disagreement and with an explanation of why you disagree.
|
File size:
194 bytes
|
Rev | Line | |
---|
[9] | 1 | package main
|
---|
| 2 |
|
---|
| 3 | import (
|
---|
| 4 | "codeberg.org/SimpleWeb/SimplyTranslate/engines"
|
---|
| 5 | )
|
---|
| 6 |
|
---|
| 7 | // TODO: port web frontend to Go.
|
---|
| 8 |
|
---|
| 9 | func main() {
|
---|
[10] | 10 | engine := &engines.GoogleTranslate{}
|
---|
[9] | 11 | print(engine.DisplayName())
|
---|
| 12 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.