Implement the function TLSCipherSuites in the /app/ directory to convert a slice of cipher suite names (as strings) into their corresponding uint16 values defined in the crypto/tls package.
Functionality Requirements:
Valid Ciphers: The function must map valid cipher suite names to their respective uint16 constants as defined in the crypto/tls package.
The supported ciphers include, but are not limited to:
TLS_RSA_WITH_RC4_128_SHA
TLS_RSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_RSA_WITH_RC4_128_SHA
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
If a cipher name is invalid (not defined in crypto/tls), return an error.
Handling Duplicates: If the input slice contains duplicate cipher names, your implementation should preserve the order of the input and return them as is.
Edge Cases:
If the input slice is empty, return a nil slice with no error.
If any cipher in the slice is invalid, return nil and an error.
Error Reporting: The function should return an error that clearly indicates the invalid cipher name(s) if any are encountered.
Your implementation must adhere to the expected outputs as outlined in the provided test cases in TestStrToUInt16.