@@ -8,12 +8,15 @@ import go
88/** Provides models of commonly used functions in the `fmt` package. */
99module Fmt {
1010 /**
11- * The `Sprint` or `Append` functions or one of their variants.
12- *
1311 * DEPRECATED: Use AppenderOrSprinterFunc instead.
12+ *
13+ * The `Sprint` or `Append` functions or one of their variants.
1414 */
1515 deprecated class AppenderOrSprinter extends TaintTracking:: FunctionModel {
16- AppenderOrSprinter ( ) { this .hasQualifiedName ( "fmt" , [ "Append" , "Sprint" ] + [ "" , "f" , "ln" ] ) }
16+ AppenderOrSprinter ( ) {
17+ this .hasQualifiedName ( "fmt" ,
18+ [ "Append" , "Appendf" , "Appendln" , "Sprint" , "Sprintf" , "Sprintln" ] )
19+ }
1720
1821 override predicate hasTaintFlow ( FunctionInput inp , FunctionOutput outp ) {
1922 inp .isParameter ( _) and outp .isResult ( )
@@ -23,13 +26,14 @@ module Fmt {
2326 /** The `Sprint` or `Append` functions or one of their variants. */
2427 class AppenderOrSprinterFunc extends Function {
2528 AppenderOrSprinterFunc ( ) {
26- this .hasQualifiedName ( "fmt" , [ "Append" , "Sprint" ] + [ "" , "f" , "ln" ] )
29+ this .hasQualifiedName ( "fmt" ,
30+ [ "Append" , "Appendf" , "Appendln" , "Sprint" , "Sprintf" , "Sprintln" ] )
2731 }
2832 }
2933
3034 /** The `Sprint` function or one of its variants. */
3135 class Sprinter extends AppenderOrSprinterFunc {
32- Sprinter ( ) { this .getName ( ) . matches ( "Sprint%" ) }
36+ Sprinter ( ) { this .getName ( ) = [ "Sprint" , "Sprintf" , "Sprintln" ] }
3337 }
3438
3539 /** The `Print` function or one of its variants. */
0 commit comments