webUtils

package
v0.0.0-...-29203d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

* File: templates Description: Executes templates and implements the range for html @author Bryan Conn @date: 10/7/2018

* File: validation.go Description: Checks a multitude of different input for validity. @author Bryan Conn @date 11/26/2018

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDate

func CheckDate(acMonth string, acDay string, acYear string, acErrorString string) (string, string)

* Function: CheckDate Description: Checks to make sure all parts of the date are the correct length and ints @param acMonth The month @param acDay The day @param acYear The year @param acErrorString The current error string @return The current error string

func CheckNDC

func CheckNDC(acNdc string, acErrorString string) (string, string)

* Function: checkNDC Description: Checks to make sure that the NDC is the correct length and has dashes in the right spots. @param acNdc The NDC code @param acErrorString The current error string @return The current error string

func CheckQty

func CheckQty(acQty string, acErrorString string) string

* Function: CheckQty Description: Checks if the quantity is greater than 0 @param qty The quantity entered @param acErrorString The current error string @return The current error string

func CheckString

func CheckString(acInput string, acErrorString string) string

* Function: CheckString Description: Checks if the entered value was a non empty string @param acInput The supposed string @param str The current error string @return The current error string

func ExecuteTemplate

func ExecuteTemplate(acWriter http.ResponseWriter, acTemplate string, aiData interface{})

* Function: ExecuteTemplate Description: Executes a html template @param acWriter The http writer @param acTemplate The template name @param aiData The data for the template to use

func ParseDate

func ParseDate(acDate string) (string, string, string)

* Function: ParseDate Description: Takes in a date in the form MM DD YYYY as a single string and returns it parsed. This method excepts dates broken up by - . or / @param acDate The date string to parse @return The date in the order month, day, year as a string

func ParseFloat

func ParseFloat(acFloatVal string) float64

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL