parse err = uuid2ParsereqNetworkUUId if err != nil loggerErrorerrError return err network err = srvcliLookupNetworkByUUIDparse if err != nil loggerErrorerrError return err
This code snippet is parsing a UUID string from req.NetworkUUId using the uuid2.Parse function. If there is an error during parsing, it logs the error using the logger.Error function and returns an empty string and the error.
If parsing is successful, it then uses the parsed UUID to lookup a network using the srv.cli.LookupNetworkByUUID function. If there is an error during the lookup, it logs the error using the logger.Error function and returns an empty string and the error.
原文地址: https://www.cveoy.top/t/topic/iD5e 著作权归作者所有。请勿转载和采集!