ali2210/WizDwarf

View on GitHub
main.go

Summary

Maintainability
F
1 mo
Test Coverage

File main.go has 2005 lines of code (exceeds 500 allowed). Consider refactoring.
Open

/* This codebase desgin according to mozilla open source license.
Redistribution , contribution and improve codebase under license
convensions. @contact Ali Hassan AliMatrixCode@protonmail.com */

// package
Severity: Major
Found in main.go - About 4 days to fix

    Function view has a Cognitive Complexity of 105 (exceeds 20 allowed). Consider refactoring.
    Open

    func view(w http.ResponseWriter, r *http.Request) {
    
        w.Header().Set("Access-Control-Allow-Origin", "*")
        w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
        w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
    Severity: Minor
    Found in main.go - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function dashboard has a Cognitive Complexity of 78 (exceeds 20 allowed). Consider refactoring.
    Open

    func dashboard(w http.ResponseWriter, r *http.Request) {
    
        // user request headers
        w.Header().Set("Access-Control-Allow-Origin", "*")
        w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
    Severity: Minor
    Found in main.go - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function dashboard has 221 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func dashboard(w http.ResponseWriter, r *http.Request) {
    
        // user request headers
        w.Header().Set("Access-Control-Allow-Origin", "*")
        w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
    Severity: Major
    Found in main.go - About 7 hrs to fix

      Function view has 199 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func view(w http.ResponseWriter, r *http.Request) {
      
          w.Header().Set("Access-Control-Allow-Origin", "*")
          w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
          w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
      Severity: Major
      Found in main.go - About 6 hrs to fix

        Function update has a Cognitive Complexity of 60 (exceeds 20 allowed). Consider refactoring.
        Open

        func update(w http.ResponseWriter, r *http.Request) {
        
            w.Header().Set("Access-Control-Allow-Origin", "*")
            w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
            w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
        Severity: Minor
        Found in main.go - About 6 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function main has 193 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func main() {
        
            // Server
        
            host := os.Getenv("HOST")
        Severity: Major
        Found in main.go - About 6 hrs to fix

          Function visualize has 189 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func visualize(w http.ResponseWriter, r *http.Request) {
          
              w.Header().Set("Access-Control-Allow-Origin", "*")
              w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
              w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
          Severity: Major
          Found in main.go - About 6 hrs to fix

            Function visualize has a Cognitive Complexity of 55 (exceeds 20 allowed). Consider refactoring.
            Open

            func visualize(w http.ResponseWriter, r *http.Request) {
            
                w.Header().Set("Access-Control-Allow-Origin", "*")
                w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
            Severity: Minor
            Found in main.go - About 6 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function update has 164 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func update(w http.ResponseWriter, r *http.Request) {
            
                w.Header().Set("Access-Control-Allow-Origin", "*")
                w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
            Severity: Major
            Found in main.go - About 5 hrs to fix

              Function dvault has 117 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

              func dvault(w http.ResponseWriter, r *http.Request) {
              
                  // user request headers
                  w.Header().Set("Access-Control-Allow-Origin", "*")
                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
              Severity: Major
              Found in main.go - About 3 hrs to fix

                Function dvault has a Cognitive Complexity of 39 (exceeds 20 allowed). Consider refactoring.
                Open

                func dvault(w http.ResponseWriter, r *http.Request) {
                
                    // user request headers
                    w.Header().Set("Access-Control-Allow-Origin", "*")
                    w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                Severity: Minor
                Found in main.go - About 3 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function analysis has 108 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

                func analysis(w http.ResponseWriter, r *http.Request) {
                
                    w.Header().Set("Access-Control-Allow-Origin", "*")
                    w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                    w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
                Severity: Major
                Found in main.go - About 3 hrs to fix

                  Function newUser has 95 lines of code (exceeds 50 allowed). Consider refactoring.
                  Open

                  func newUser(w http.ResponseWriter, r *http.Request) {
                  
                      // user request headers
                      w.Header().Set("Access-Control-Allow-Origin", "*")
                      w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                  Severity: Major
                  Found in main.go - About 2 hrs to fix

                    Function analysis has a Cognitive Complexity of 35 (exceeds 20 allowed). Consider refactoring.
                    Open

                    func analysis(w http.ResponseWriter, r *http.Request) {
                    
                        w.Header().Set("Access-Control-Allow-Origin", "*")
                        w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                        w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
                    Severity: Minor
                    Found in main.go - About 2 hrs to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function dashboard has 27 return statements (exceeds 4 allowed).
                    Open

                    func dashboard(w http.ResponseWriter, r *http.Request) {
                    
                        // user request headers
                        w.Header().Set("Access-Control-Allow-Origin", "*")
                        w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                    Severity: Major
                    Found in main.go - About 2 hrs to fix

                      Function main has a Cognitive Complexity of 32 (exceeds 20 allowed). Consider refactoring.
                      Open

                      func main() {
                      
                          // Server
                      
                          host := os.Getenv("HOST")
                      Severity: Minor
                      Found in main.go - About 2 hrs to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function view has 23 return statements (exceeds 4 allowed).
                      Open

                      func view(w http.ResponseWriter, r *http.Request) {
                      
                          w.Header().Set("Access-Control-Allow-Origin", "*")
                          w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                          w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
                      Severity: Major
                      Found in main.go - About 2 hrs to fix

                        Function profile has 75 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

                        func profile(w http.ResponseWriter, r *http.Request) {
                        
                            w.Header().Set("Access-Control-Allow-Origin", "*")
                            w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                            w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
                        Severity: Minor
                        Found in main.go - About 2 hrs to fix

                          Function existing has 73 lines of code (exceeds 50 allowed). Consider refactoring.
                          Open

                          func existing(w http.ResponseWriter, r *http.Request) {
                          
                              // user request headers
                              w.Header().Set("Access-Control-Allow-Origin", "*")
                              w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                          Severity: Minor
                          Found in main.go - About 1 hr to fix

                            Function existing has a Cognitive Complexity of 28 (exceeds 20 allowed). Consider refactoring.
                            Open

                            func existing(w http.ResponseWriter, r *http.Request) {
                            
                                // user request headers
                                w.Header().Set("Access-Control-Allow-Origin", "*")
                                w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                            Severity: Minor
                            Found in main.go - About 1 hr to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

                            Function visualize has 17 return statements (exceeds 4 allowed).
                            Open

                            func visualize(w http.ResponseWriter, r *http.Request) {
                            
                                w.Header().Set("Access-Control-Allow-Origin", "*")
                                w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
                            Severity: Major
                            Found in main.go - About 1 hr to fix

                              Function profile has a Cognitive Complexity of 26 (exceeds 20 allowed). Consider refactoring.
                              Open

                              func profile(w http.ResponseWriter, r *http.Request) {
                              
                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                  w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
                              Severity: Minor
                              Found in main.go - About 1 hr to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function update has 13 return statements (exceeds 4 allowed).
                              Open

                              func update(w http.ResponseWriter, r *http.Request) {
                              
                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                  w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
                              Severity: Major
                              Found in main.go - About 1 hr to fix

                                Function newUser has a Cognitive Complexity of 26 (exceeds 20 allowed). Consider refactoring.
                                Open

                                func newUser(w http.ResponseWriter, r *http.Request) {
                                
                                    // user request headers
                                    w.Header().Set("Access-Control-Allow-Origin", "*")
                                    w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                Severity: Minor
                                Found in main.go - About 1 hr to fix

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Function analysis has 10 return statements (exceeds 4 allowed).
                                Open

                                func analysis(w http.ResponseWriter, r *http.Request) {
                                
                                    w.Header().Set("Access-Control-Allow-Origin", "*")
                                    w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                    w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
                                Severity: Major
                                Found in main.go - About 1 hr to fix

                                  Function main has 10 return statements (exceeds 4 allowed).
                                  Open

                                  func main() {
                                  
                                      // Server
                                  
                                      host := os.Getenv("HOST")
                                  Severity: Major
                                  Found in main.go - About 1 hr to fix

                                    Function newUser has 8 return statements (exceeds 4 allowed).
                                    Open

                                    func newUser(w http.ResponseWriter, r *http.Request) {
                                    
                                        // user request headers
                                        w.Header().Set("Access-Control-Allow-Origin", "*")
                                        w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                    Severity: Major
                                    Found in main.go - About 50 mins to fix

                                      Function dvault has 8 return statements (exceeds 4 allowed).
                                      Open

                                      func dvault(w http.ResponseWriter, r *http.Request) {
                                      
                                          // user request headers
                                          w.Header().Set("Access-Control-Allow-Origin", "*")
                                          w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                      Severity: Major
                                      Found in main.go - About 50 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                        if err != nil {
                                                            return
                                                        }
                                        Severity: Major
                                        Found in main.go - About 45 mins to fix

                                          Function existing has 7 return statements (exceeds 4 allowed).
                                          Open

                                          func existing(w http.ResponseWriter, r *http.Request) {
                                          
                                              // user request headers
                                              w.Header().Set("Access-Control-Allow-Origin", "*")
                                              w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                          Severity: Major
                                          Found in main.go - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                    } else if strings.Contains(r.FormValue("status"), "maried") {
                                                        updated_info.Status = user.Relationship_Maried
                                                    } else if strings.Contains(r.FormValue("status"), "Widow") {
                                                        updated_info.Status = user.Relationship_Widow
                                                    } else if strings.Contains(r.FormValue("status"), "widow") {
                                            Severity: Major
                                            Found in main.go - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                              if err != nil {
                                                                  return
                                                              }
                                              Severity: Major
                                              Found in main.go - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                if err != nil {
                                                                    return
                                                                }
                                                Severity: Major
                                                Found in main.go - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                      if err != nil {
                                                                          return
                                                                      }
                                                  Severity: Major
                                                  Found in main.go - About 45 mins to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                            } else if strings.Contains(r.FormValue("sufix"), "mrs") {
                                                                updated_info.Suffix = user.Respecful_Mrs
                                                                updated_info.Gender = user.Traits_WOMEN
                                                            } else if strings.Contains(r.FormValue("sufix"), "Ms") {
                                                                updated_info.Suffix = user.Respecful_Ms
                                                    Severity: Major
                                                    Found in main.go - About 45 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                      if err != nil {
                                                                          return
                                                                      }
                                                      Severity: Major
                                                      Found in main.go - About 45 mins to fix

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                        if err != nil {
                                                                            return
                                                                        }
                                                        Severity: Major
                                                        Found in main.go - About 45 mins to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                          if err != nil {
                                                                              return
                                                                          }
                                                          Severity: Major
                                                          Found in main.go - About 45 mins to fix

                                                            Function profile has 6 return statements (exceeds 4 allowed).
                                                            Open

                                                            func profile(w http.ResponseWriter, r *http.Request) {
                                                            
                                                                w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                                w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
                                                            Severity: Major
                                                            Found in main.go - About 40 mins to fix

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

                                                                  } else {
                                                              
                                                                      meta, mapData, _ := piplines.GetDocuments([]string{data.ID}...)
                                                                      contKey, contVae := piplines.ReflectMaps(mapData)
                                                              
                                                              
                                                              Severity: Major
                                                              Found in main.go and 1 other location - About 1 day to fix
                                                              main.go on lines 2036..2139

                                                              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 818.

                                                              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 2 locations. Consider refactoring.
                                                              Open

                                                                  if !reflect.DeepEqual(update, &user.Updated_User{}) && updateInfo {
                                                              
                                                                      meta, mapData, _ := piplines.GetDocuments([]string{update.ID}...)
                                                                      contKey, contVae := piplines.ReflectMaps(mapData)
                                                              
                                                              
                                                              Severity: Major
                                                              Found in main.go and 1 other location - About 1 day to fix
                                                              main.go on lines 2139..2244

                                                              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 818.

                                                              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 2 locations. Consider refactoring.
                                                              Open

                                                              func terms(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  temp := template.Must(template.ParseFiles("terms.html"))
                                                              
                                                                  // user request headers
                                                              Severity: Major
                                                              Found in main.go and 1 other location - About 2 hrs to fix
                                                              main.go on lines 805..825

                                                              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 227.

                                                              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 2 locations. Consider refactoring.
                                                              Open

                                                              func messages(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  temp := template.Must(template.ParseFiles("messages.html"))
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 1 other location - About 2 hrs to fix
                                                              main.go on lines 1710..1733

                                                              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 227.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func glutamine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func glutamic(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func isoleucine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func leucine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func methionine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func serine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func tyrosine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func lysine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func alanine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func cysteine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func histidine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func proline(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func asparagine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func valine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func glycine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // User requests headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func stop_codon(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func phenylalanine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func aspartic(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func threonine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func tryptophan(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2878..2898
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 21 locations. Consider refactoring.
                                                              Open

                                                              func arginine(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  // user request headers
                                                                  w.Header().Set("Access-Control-Allow-Origin", "*")
                                                                  w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                                                              Severity: Major
                                                              Found in main.go and 20 other locations - About 2 hrs to fix
                                                              main.go on lines 2459..2481
                                                              main.go on lines 2483..2503
                                                              main.go on lines 2505..2525
                                                              main.go on lines 2527..2547
                                                              main.go on lines 2549..2569
                                                              main.go on lines 2571..2591
                                                              main.go on lines 2593..2613
                                                              main.go on lines 2615..2635
                                                              main.go on lines 2637..2657
                                                              main.go on lines 2659..2679
                                                              main.go on lines 2681..2701
                                                              main.go on lines 2703..2723
                                                              main.go on lines 2724..2744
                                                              main.go on lines 2746..2766
                                                              main.go on lines 2768..2788
                                                              main.go on lines 2790..2810
                                                              main.go on lines 2812..2832
                                                              main.go on lines 2834..2854
                                                              main.go on lines 2856..2876
                                                              main.go on lines 2900..2923

                                                              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 204.

                                                              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 5 locations. Consider refactoring.
                                                              Open

                                                                      case "3":
                                                                          var name string = "KenyaEbola"
                                                                          err := piplines.Data_Predicition(w, r, name, choose, data, algo)
                                                                          if err != nil {
                                                                              w.WriteHeader(http.StatusBadRequest)
                                                              Severity: Major
                                                              Found in main.go and 4 other locations - About 2 hrs to fix
                                                              main.go on lines 1560..1587
                                                              main.go on lines 1589..1612
                                                              main.go on lines 1637..1660
                                                              main.go on lines 1661..1684

                                                              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 191.

                                                              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 5 locations. Consider refactoring.
                                                              Open

                                                                      case "4":
                                                                          var name string = "ZikaVirusBrazil"
                                                                          err := piplines.Data_Predicition(w, r, name, choose, data, algo)
                                                                          if err != nil {
                                                                              w.WriteHeader(http.StatusBadRequest)
                                                              Severity: Major
                                                              Found in main.go and 4 other locations - About 2 hrs to fix
                                                              main.go on lines 1560..1587
                                                              main.go on lines 1589..1612
                                                              main.go on lines 1613..1636
                                                              main.go on lines 1661..1684

                                                              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 191.

                                                              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 5 locations. Consider refactoring.
                                                              Open

                                                                      case "2":
                                                                          var name string = "FlaviDengue"
                                                                          err := piplines.Data_Predicition(w, r, name, choose, data, algo)
                                                                          if err != nil {
                                                                              w.WriteHeader(http.StatusBadRequest)
                                                              Severity: Major
                                                              Found in main.go and 4 other locations - About 2 hrs to fix
                                                              main.go on lines 1560..1587
                                                              main.go on lines 1613..1636
                                                              main.go on lines 1637..1660
                                                              main.go on lines 1661..1684

                                                              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 191.

                                                              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 5 locations. Consider refactoring.
                                                              Open

                                                                      case "1":
                                                                          var name string = "Covid-19"
                                                              
                                                                          // compute predication
                                                                          err := piplines.Data_Predicition(w, r, name, choose, data, algo)
                                                              Severity: Major
                                                              Found in main.go and 4 other locations - About 2 hrs to fix
                                                              main.go on lines 1589..1612
                                                              main.go on lines 1613..1636
                                                              main.go on lines 1637..1660
                                                              main.go on lines 1661..1684

                                                              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 191.

                                                              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 5 locations. Consider refactoring.
                                                              Open

                                                                      case "5":
                                                                          var name string = "MersSaudiaArabia"
                                                                          err := piplines.Data_Predicition(w, r, name, choose, data, algo)
                                                                          if err != nil {
                                                                              w.WriteHeader(http.StatusBadRequest)
                                                              Severity: Major
                                                              Found in main.go and 4 other locations - About 2 hrs to fix
                                                              main.go on lines 1560..1587
                                                              main.go on lines 1589..1612
                                                              main.go on lines 1613..1636
                                                              main.go on lines 1637..1660

                                                              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 191.

                                                              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 2 locations. Consider refactoring.
                                                              Open

                                                              func setting(w http.ResponseWriter, r *http.Request) {
                                                              
                                                                  temp := template.Must(template.ParseFiles("settings.html"))
                                                              
                                                                  if r.Method == "GET" {
                                                              Severity: Major
                                                              Found in main.go and 1 other location - About 1 hr to fix
                                                              main.go on lines 1693..1708

                                                              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 150.

                                                              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 2 locations. Consider refactoring.
                                                              Open

                                                              func customerViews(w http.ResponseWriter, r *http.Request) {
                                                                  temp := template.Must(template.ParseFiles("feedback.html"))
                                                              
                                                                  // require different param
                                                                  if r.Method == "GET" {
                                                              Severity: Major
                                                              Found in main.go and 1 other location - About 1 hr to fix
                                                              main.go on lines 846..861

                                                              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 150.

                                                              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 2 locations. Consider refactoring.
                                                              Open

                                                                      if err != nil {
                                                              
                                                                          w.WriteHeader(http.StatusBadRequest)
                                                                          distorted(w, r)
                                                                          cacheObject.Set_Key("Internal:", err.Error())
                                                              Severity: Minor
                                                              Found in main.go and 1 other location - About 35 mins to fix
                                                              main.go on lines 1910..1923

                                                              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 103.

                                                              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 2 locations. Consider refactoring.
                                                              Open

                                                                      if err != nil {
                                                                          w.WriteHeader(http.StatusBadRequest)
                                                                          distorted(w, r)
                                                                          cacheObject.Set_Key("Internal:", err.Error())
                                                              
                                                              
                                                              Severity: Minor
                                                              Found in main.go and 1 other location - About 35 mins to fix
                                                              main.go on lines 1885..1899

                                                              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 103.

                                                              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

                                                              Identical blocks of code found in 2 locations. Consider refactoring.
                                                              Open

                                                                              if !ok {
                                                                                  w.WriteHeader(http.StatusBadRequest)
                                                                                  distorted(w, r)
                                                                                  cacheObject.Set_Key("Internal:", err.Error())
                                                              
                                                              
                                                              Severity: Minor
                                                              Found in main.go and 1 other location - About 30 mins to fix
                                                              main.go on lines 1969..1982

                                                              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 101.

                                                              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

                                                              Identical blocks of code found in 2 locations. Consider refactoring.
                                                              Open

                                                                          if !ok {
                                                                              w.WriteHeader(http.StatusBadRequest)
                                                                              distorted(w, r)
                                                                              cacheObject.Set_Key("Internal:", err.Error())
                                                              
                                                              
                                                              Severity: Minor
                                                              Found in main.go and 1 other location - About 30 mins to fix
                                                              main.go on lines 1940..1953

                                                              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 101.

                                                              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

                                                              There are no issues that match your filters.

                                                              Category
                                                              Status