gopheracademy/gcon

View on GitHub
models/ponzi.go

Summary

Maintainability
D
2 days
Test Coverage

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetHotel(id int) (content.Hotel, error) {
    initHotelCache()
    var sp HotelListResult
    err := hotelCache.Get(id, "Hotel", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 93..105
models/ponzi.go on lines 119..131
models/ponzi.go on lines 132..144
models/ponzi.go on lines 145..157
models/ponzi.go on lines 158..170
models/ponzi.go on lines 171..183
models/ponzi.go on lines 184..196
models/ponzi.go on lines 198..210
models/ponzi.go on lines 211..223
models/ponzi.go on lines 224..236
models/ponzi.go on lines 237..249
models/ponzi.go on lines 250..262
models/ponzi.go on lines 263..275
models/ponzi.go on lines 276..288
models/ponzi.go on lines 289..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetPage(id int) (content.Page, error) {
    initPageCache()
    var sp PageListResult
    err := pageCache.Get(id, "Page", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 93..105
models/ponzi.go on lines 106..118
models/ponzi.go on lines 132..144
models/ponzi.go on lines 145..157
models/ponzi.go on lines 158..170
models/ponzi.go on lines 171..183
models/ponzi.go on lines 184..196
models/ponzi.go on lines 198..210
models/ponzi.go on lines 211..223
models/ponzi.go on lines 224..236
models/ponzi.go on lines 237..249
models/ponzi.go on lines 250..262
models/ponzi.go on lines 263..275
models/ponzi.go on lines 276..288
models/ponzi.go on lines 289..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetSlot(id int) (content.Slot, error) {
    initSlotCache()
    var sp SlotListResult
    err := slotCache.Get(id, "Slot", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 93..105
models/ponzi.go on lines 106..118
models/ponzi.go on lines 119..131
models/ponzi.go on lines 132..144
models/ponzi.go on lines 158..170
models/ponzi.go on lines 171..183
models/ponzi.go on lines 184..196
models/ponzi.go on lines 198..210
models/ponzi.go on lines 211..223
models/ponzi.go on lines 224..236
models/ponzi.go on lines 237..249
models/ponzi.go on lines 250..262
models/ponzi.go on lines 263..275
models/ponzi.go on lines 276..288
models/ponzi.go on lines 289..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetSponsorBySlug(slug string) (content.Sponsor, error) {
    initSponsorCache()
    var sp SponsorListResult
    err := sponsorCache.GetBySlug(slug, "Sponsor", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 93..105
models/ponzi.go on lines 106..118
models/ponzi.go on lines 119..131
models/ponzi.go on lines 132..144
models/ponzi.go on lines 145..157
models/ponzi.go on lines 158..170
models/ponzi.go on lines 171..183
models/ponzi.go on lines 184..196
models/ponzi.go on lines 198..210
models/ponzi.go on lines 211..223
models/ponzi.go on lines 224..236
models/ponzi.go on lines 237..249
models/ponzi.go on lines 250..262
models/ponzi.go on lines 263..275
models/ponzi.go on lines 289..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetWorkshop(id int) (content.Workshop, error) {
    initWorkshopCache()
    var sp WorkshopListResult
    err := workshopCache.Get(id, "Workshop", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 93..105
models/ponzi.go on lines 106..118
models/ponzi.go on lines 119..131
models/ponzi.go on lines 132..144
models/ponzi.go on lines 145..157
models/ponzi.go on lines 158..170
models/ponzi.go on lines 171..183
models/ponzi.go on lines 198..210
models/ponzi.go on lines 211..223
models/ponzi.go on lines 224..236
models/ponzi.go on lines 237..249
models/ponzi.go on lines 250..262
models/ponzi.go on lines 263..275
models/ponzi.go on lines 276..288
models/ponzi.go on lines 289..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetHotelBySlug(slug string) (content.Hotel, error) {
    initHotelCache()
    var sp HotelListResult
    err := hotelCache.GetBySlug(slug, "Hotel", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 93..105
models/ponzi.go on lines 106..118
models/ponzi.go on lines 119..131
models/ponzi.go on lines 132..144
models/ponzi.go on lines 145..157
models/ponzi.go on lines 158..170
models/ponzi.go on lines 171..183
models/ponzi.go on lines 184..196
models/ponzi.go on lines 198..210
models/ponzi.go on lines 224..236
models/ponzi.go on lines 237..249
models/ponzi.go on lines 250..262
models/ponzi.go on lines 263..275
models/ponzi.go on lines 276..288
models/ponzi.go on lines 289..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetPresentation(id int) (content.Presentation, error) {
    initPresentationCache()
    var sp PresentationListResult
    err := presentationCache.Get(id, "Presentation", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 93..105
models/ponzi.go on lines 106..118
models/ponzi.go on lines 119..131
models/ponzi.go on lines 145..157
models/ponzi.go on lines 158..170
models/ponzi.go on lines 171..183
models/ponzi.go on lines 184..196
models/ponzi.go on lines 198..210
models/ponzi.go on lines 211..223
models/ponzi.go on lines 224..236
models/ponzi.go on lines 237..249
models/ponzi.go on lines 250..262
models/ponzi.go on lines 263..275
models/ponzi.go on lines 276..288
models/ponzi.go on lines 289..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetEventBySlug(slug string) (content.Event, error) {
    initEventCache()
    var sp EventListResult
    err := eventCache.GetBySlug(slug, "Event", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 93..105
models/ponzi.go on lines 106..118
models/ponzi.go on lines 119..131
models/ponzi.go on lines 132..144
models/ponzi.go on lines 145..157
models/ponzi.go on lines 158..170
models/ponzi.go on lines 171..183
models/ponzi.go on lines 184..196
models/ponzi.go on lines 211..223
models/ponzi.go on lines 224..236
models/ponzi.go on lines 237..249
models/ponzi.go on lines 250..262
models/ponzi.go on lines 263..275
models/ponzi.go on lines 276..288
models/ponzi.go on lines 289..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetPageBySlug(slug string) (content.Page, error) {
    initPageCache()
    var sp PageListResult
    err := pageCache.GetBySlug(slug, "Page", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 93..105
models/ponzi.go on lines 106..118
models/ponzi.go on lines 119..131
models/ponzi.go on lines 132..144
models/ponzi.go on lines 145..157
models/ponzi.go on lines 158..170
models/ponzi.go on lines 171..183
models/ponzi.go on lines 184..196
models/ponzi.go on lines 198..210
models/ponzi.go on lines 211..223
models/ponzi.go on lines 237..249
models/ponzi.go on lines 250..262
models/ponzi.go on lines 263..275
models/ponzi.go on lines 276..288
models/ponzi.go on lines 289..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetSlotBySlug(slug string) (content.Slot, error) {
    initSlotCache()
    var sp SlotListResult
    err := slotCache.GetBySlug(slug, "Slot", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 93..105
models/ponzi.go on lines 106..118
models/ponzi.go on lines 119..131
models/ponzi.go on lines 132..144
models/ponzi.go on lines 145..157
models/ponzi.go on lines 158..170
models/ponzi.go on lines 171..183
models/ponzi.go on lines 184..196
models/ponzi.go on lines 198..210
models/ponzi.go on lines 211..223
models/ponzi.go on lines 224..236
models/ponzi.go on lines 237..249
models/ponzi.go on lines 263..275
models/ponzi.go on lines 276..288
models/ponzi.go on lines 289..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetSponsor(id int) (content.Sponsor, error) {
    initSponsorCache()
    var sp SponsorListResult
    err := sponsorCache.Get(id, "Sponsor", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 93..105
models/ponzi.go on lines 106..118
models/ponzi.go on lines 119..131
models/ponzi.go on lines 132..144
models/ponzi.go on lines 145..157
models/ponzi.go on lines 158..170
models/ponzi.go on lines 184..196
models/ponzi.go on lines 198..210
models/ponzi.go on lines 211..223
models/ponzi.go on lines 224..236
models/ponzi.go on lines 237..249
models/ponzi.go on lines 250..262
models/ponzi.go on lines 263..275
models/ponzi.go on lines 276..288
models/ponzi.go on lines 289..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetWorkshopBySlug(slug string) (content.Workshop, error) {
    initWorkshopCache()
    var sp WorkshopListResult
    err := workshopCache.GetBySlug(slug, "Workshop", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 93..105
models/ponzi.go on lines 106..118
models/ponzi.go on lines 119..131
models/ponzi.go on lines 132..144
models/ponzi.go on lines 145..157
models/ponzi.go on lines 158..170
models/ponzi.go on lines 171..183
models/ponzi.go on lines 184..196
models/ponzi.go on lines 198..210
models/ponzi.go on lines 211..223
models/ponzi.go on lines 224..236
models/ponzi.go on lines 237..249
models/ponzi.go on lines 250..262
models/ponzi.go on lines 263..275
models/ponzi.go on lines 276..288

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetSpeaker(id int) (content.Speaker, error) {
    initSpeakerCache()
    var sp SpeakerListResult
    err := speakerCache.Get(id, "Speaker", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 93..105
models/ponzi.go on lines 106..118
models/ponzi.go on lines 119..131
models/ponzi.go on lines 132..144
models/ponzi.go on lines 145..157
models/ponzi.go on lines 171..183
models/ponzi.go on lines 184..196
models/ponzi.go on lines 198..210
models/ponzi.go on lines 211..223
models/ponzi.go on lines 224..236
models/ponzi.go on lines 237..249
models/ponzi.go on lines 250..262
models/ponzi.go on lines 263..275
models/ponzi.go on lines 276..288
models/ponzi.go on lines 289..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetPresentationBySlug(slug string) (content.Presentation, error) {
    initPresentationCache()
    var sp PresentationListResult
    err := presentationCache.GetBySlug(slug, "Presentation", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 93..105
models/ponzi.go on lines 106..118
models/ponzi.go on lines 119..131
models/ponzi.go on lines 132..144
models/ponzi.go on lines 145..157
models/ponzi.go on lines 158..170
models/ponzi.go on lines 171..183
models/ponzi.go on lines 184..196
models/ponzi.go on lines 198..210
models/ponzi.go on lines 211..223
models/ponzi.go on lines 224..236
models/ponzi.go on lines 250..262
models/ponzi.go on lines 263..275
models/ponzi.go on lines 276..288
models/ponzi.go on lines 289..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetSpeakerBySlug(slug string) (content.Speaker, error) {
    initSpeakerCache()
    var sp SpeakerListResult
    err := speakerCache.GetBySlug(slug, "Speaker", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 93..105
models/ponzi.go on lines 106..118
models/ponzi.go on lines 119..131
models/ponzi.go on lines 132..144
models/ponzi.go on lines 145..157
models/ponzi.go on lines 158..170
models/ponzi.go on lines 171..183
models/ponzi.go on lines 184..196
models/ponzi.go on lines 198..210
models/ponzi.go on lines 211..223
models/ponzi.go on lines 224..236
models/ponzi.go on lines 237..249
models/ponzi.go on lines 250..262
models/ponzi.go on lines 276..288
models/ponzi.go on lines 289..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

func GetEvent(id int) (content.Event, error) {
    initEventCache()
    var sp EventListResult
    err := eventCache.Get(id, "Event", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 15 other locations - About 1 hr to fix
models/ponzi.go on lines 106..118
models/ponzi.go on lines 119..131
models/ponzi.go on lines 132..144
models/ponzi.go on lines 145..157
models/ponzi.go on lines 158..170
models/ponzi.go on lines 171..183
models/ponzi.go on lines 184..196
models/ponzi.go on lines 198..210
models/ponzi.go on lines 211..223
models/ponzi.go on lines 224..236
models/ponzi.go on lines 237..249
models/ponzi.go on lines 250..262
models/ponzi.go on lines 263..275
models/ponzi.go on lines 276..288
models/ponzi.go on lines 289..301

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

func GetSpeakerList() ([]content.Speaker, error) {
    initSpeakerCache()
    var sp SpeakerListResult
    err := speakerCache.GetAll("Speaker", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 7 other locations - About 55 mins to fix
models/ponzi.go on lines 303..315
models/ponzi.go on lines 316..328
models/ponzi.go on lines 329..341
models/ponzi.go on lines 342..354
models/ponzi.go on lines 355..367
models/ponzi.go on lines 381..393
models/ponzi.go on lines 394..406

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 123.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

func GetEventList() ([]content.Event, error) {
    initEventCache()
    var sp EventListResult
    err := eventCache.GetAll("Event", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 7 other locations - About 55 mins to fix
models/ponzi.go on lines 316..328
models/ponzi.go on lines 329..341
models/ponzi.go on lines 342..354
models/ponzi.go on lines 355..367
models/ponzi.go on lines 368..380
models/ponzi.go on lines 381..393
models/ponzi.go on lines 394..406

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 123.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

func GetPresentationList() ([]content.Presentation, error) {
    initPresentationCache()
    var sp PresentationListResult
    err := presentationCache.GetAll("Presentation", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 7 other locations - About 55 mins to fix
models/ponzi.go on lines 303..315
models/ponzi.go on lines 316..328
models/ponzi.go on lines 329..341
models/ponzi.go on lines 355..367
models/ponzi.go on lines 368..380
models/ponzi.go on lines 381..393
models/ponzi.go on lines 394..406

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 123.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

func GetHotelList() ([]content.Hotel, error) {
    initHotelCache()
    var sp HotelListResult
    err := hotelCache.GetAll("Hotel", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 7 other locations - About 55 mins to fix
models/ponzi.go on lines 303..315
models/ponzi.go on lines 329..341
models/ponzi.go on lines 342..354
models/ponzi.go on lines 355..367
models/ponzi.go on lines 368..380
models/ponzi.go on lines 381..393
models/ponzi.go on lines 394..406

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 123.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

func GetPageList() ([]content.Page, error) {
    initPageCache()
    var sp PageListResult
    err := pageCache.GetAll("Page", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 7 other locations - About 55 mins to fix
models/ponzi.go on lines 303..315
models/ponzi.go on lines 316..328
models/ponzi.go on lines 342..354
models/ponzi.go on lines 355..367
models/ponzi.go on lines 368..380
models/ponzi.go on lines 381..393
models/ponzi.go on lines 394..406

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 123.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

func GetSlotList() ([]content.Slot, error) {
    initSlotCache()
    var sp SlotListResult
    err := slotCache.GetAll("Slot", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 7 other locations - About 55 mins to fix
models/ponzi.go on lines 303..315
models/ponzi.go on lines 316..328
models/ponzi.go on lines 329..341
models/ponzi.go on lines 342..354
models/ponzi.go on lines 368..380
models/ponzi.go on lines 381..393
models/ponzi.go on lines 394..406

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 123.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

func GetSponsorList() ([]content.Sponsor, error) {
    initSponsorCache()
    var sp SponsorListResult
    err := sponsorCache.GetAll("Sponsor", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 7 other locations - About 55 mins to fix
models/ponzi.go on lines 303..315
models/ponzi.go on lines 316..328
models/ponzi.go on lines 329..341
models/ponzi.go on lines 342..354
models/ponzi.go on lines 355..367
models/ponzi.go on lines 368..380
models/ponzi.go on lines 394..406

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 123.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

func GetWorkshopList() ([]content.Workshop, error) {
    initWorkshopCache()
    var sp WorkshopListResult
    err := workshopCache.GetAll("Workshop", &sp)
    if err != nil {
Severity: Major
Found in models/ponzi.go and 7 other locations - About 55 mins to fix
models/ponzi.go on lines 303..315
models/ponzi.go on lines 316..328
models/ponzi.go on lines 329..341
models/ponzi.go on lines 342..354
models/ponzi.go on lines 355..367
models/ponzi.go on lines 368..380
models/ponzi.go on lines 381..393

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 123.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

exported function GetSponsorBySlug should have comment or be unexported
Open

func GetSponsorBySlug(slug string) (content.Sponsor, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetPageBySlug should have comment or be unexported
Open

func GetPageBySlug(slug string) (content.Page, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetPresentationBySlug should have comment or be unexported
Open

func GetPresentationBySlug(slug string) (content.Presentation, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetSpeaker should have comment or be unexported
Open

func GetSpeaker(id int) (content.Speaker, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported type EventListResult should have comment or be unexported
Open

type EventListResult struct {
Severity: Minor
Found in models/ponzi.go by golint

exported type WorkshopListResult should have comment or be unexported
Open

type WorkshopListResult struct {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetHotel should have comment or be unexported
Open

func GetHotel(id int) (content.Hotel, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetPage should have comment or be unexported
Open

func GetPage(id int) (content.Page, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetSponsor should have comment or be unexported
Open

func GetSponsor(id int) (content.Sponsor, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported var BaseURL should have comment or be unexported
Open

var BaseURL string
Severity: Minor
Found in models/ponzi.go by golint

exported type SpeakerListResult should have comment or be unexported
Open

type SpeakerListResult struct {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetSpeakerBySlug should have comment or be unexported
Open

func GetSpeakerBySlug(slug string) (content.Speaker, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetWorkshopBySlug should have comment or be unexported
Open

func GetWorkshopBySlug(slug string) (content.Workshop, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetWorkshop should have comment or be unexported
Open

func GetWorkshop(id int) (content.Workshop, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported type HotelListResult should have comment or be unexported
Open

type HotelListResult struct {
Severity: Minor
Found in models/ponzi.go by golint

exported type SlotListResult should have comment or be unexported
Open

type SlotListResult struct {
Severity: Minor
Found in models/ponzi.go by golint

exported type SponsorListResult should have comment or be unexported
Open

type SponsorListResult struct {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetHotelBySlug should have comment or be unexported
Open

func GetHotelBySlug(slug string) (content.Hotel, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetEventBySlug should have comment or be unexported
Open

func GetEventBySlug(slug string) (content.Event, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported type PresentationListResult should have comment or be unexported
Open

type PresentationListResult struct {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetSlotBySlug should have comment or be unexported
Open

func GetSlotBySlug(slug string) (content.Slot, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported type PageListResult should have comment or be unexported
Open

type PageListResult struct {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetEvent should have comment or be unexported
Open

func GetEvent(id int) (content.Event, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetPresentation should have comment or be unexported
Open

func GetPresentation(id int) (content.Presentation, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetSlot should have comment or be unexported
Open

func GetSlot(id int) (content.Slot, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetSlotList should have comment or be unexported
Open

func GetSlotList() ([]content.Slot, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetPageList should have comment or be unexported
Open

func GetPageList() ([]content.Page, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetEventList should have comment or be unexported
Open

func GetEventList() ([]content.Event, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetSponsorList should have comment or be unexported
Open

func GetSponsorList() ([]content.Sponsor, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetHotelList should have comment or be unexported
Open

func GetHotelList() ([]content.Hotel, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetWorkshopList should have comment or be unexported
Open

func GetWorkshopList() ([]content.Workshop, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetPresentationList should have comment or be unexported
Open

func GetPresentationList() ([]content.Presentation, error) {
Severity: Minor
Found in models/ponzi.go by golint

exported function GetSpeakerList should have comment or be unexported
Open

func GetSpeakerList() ([]content.Speaker, error) {
Severity: Minor
Found in models/ponzi.go by golint

There are no issues that match your filters.

Category
Status