func firstFunctionAtLine(tags []map[string]string) (int, error) { for _, tag := range tags { _, tagHasAtLeastOneField := utils.TagHasAtLeastOneField(tag, FIELDS_MARKING_UNHANDLED_TAGS) if !tagIsUnknown(tag) && !tagHasAtLeastOneField && tag[FIELD_KIND] == KIND_FUNCTION { return strconv.Atoi(tag[FIELD_LINE]) } } return -1, nil }
func skipTagsWithField(tags []map[string]string, fields []string, context map[string]interface{}) { for _, tag := range tags { if field, skip := utils.TagHasAtLeastOneField(tag, fields); skip { if utils.DebugLevel(context) >= 10 { utils.Logger(context).Fprintln(os.Stderr, constants.MSG_SKIPPING_TAG_BECAUSE_HAS_FIELD, field) } tag[FIELD_SKIP] = TRUE } } }