Advertisement
dereksir

Untitled

Dec 20th, 2023 (edited)
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.28 KB | None | 0 0
  1.         //..           
  2.             // Evaluate Tokens for H2
  3.             switch token.Data {
  4.             case "h2":
  5.                 // Fetch next token within H2 and extract its text content.
  6.                 tokenType = z.Next()
  7.                 if tokenType == html.TextToken {
  8.                     name := z.Token().Data
  9.                     fmt.Println("Name:", name)
  10.                 }
  11.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement