Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for CallReadValues (0.18 sec)

  1. test/fixedbugs/issue30908.dir/m.go

    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"os"
    
    	"./b"
    )
    
    func main() {
    	seed := "some things are better"
    	bsl := []byte(seed)
    	b.CallReadValues("/dev/null")
    	vals, err := b.ReadValues(bsl)
    	if vals["better"] != seed || err != nil {
    		os.Exit(1)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 15:00:08 UTC 2019
    - 393 bytes
    - Viewed (0)
  2. test/fixedbugs/issue30908.dir/b.go

    	err = a.Unmarshal(data, &vals)
    	if len(vals) == 0 {
    		vals = map[string]interface{}{}
    	}
    	return
    }
    
    // A local call to the function above, which triggers the "move to heap"
    // of the output param.
    func CallReadValues(filename string) (map[string]interface{}, error) {
    	defer func() { G++ }()
    	data, err := ioutil.ReadFile(filename)
    	if err != nil {
    		return map[string]interface{}{}, err
    	}
    	return ReadValues(data)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 15:00:08 UTC 2019
    - 876 bytes
    - Viewed (0)
Back to top