Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 3,282 for main2 (0.04 sec)

  1. src/cmd/cgo/internal/testcarchive/testdata/main6.c

    // license that can be found in the LICENSE file.
    
    // Test that using the Go profiler in a C program does not crash.
    
    #include <stddef.h>
    #include <sys/time.h>
    
    #include "libgo6.h"
    
    int main(int argc, char **argv) {
    	struct timeval tvstart, tvnow;
    	int diff;
    
    	gettimeofday(&tvstart, NULL);
    
    	go_start_profile();
    
    	// Busy wait so we have something to profile.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 830 bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testplugin/testdata/issue53989/main.go

    // from the plugin jumps in the middle of the function
    // to the function with the same name in the main
    // executable. As these two functions may be compiled
    // differently as plugin needs to be PIC, this causes
    // crash.
    
    package main
    
    import (
    	"plugin"
    
    	"testplugin/issue53989/p"
    )
    
    func main() {
    	p.Square(7) // call the function in main executable
    
    	p, err := plugin.Open("issue53989.so")
    	if err != nil {
    		panic(err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 751 bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/testplugin/testdata/unnamed1/main.go

    //go:build ignore
    
    package main
    
    // // No C code required.
    import "C"
    
    func FuncInt() int { return 1 }
    
    // Add a recursive type to check that type equality across plugins doesn't
    // crash. See https://golang.org/issues/19258
    func FuncRecursive() X { return X{} }
    
    type Y struct {
    	X *X
    }
    type X struct {
    	Y Y
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 487 bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/testplugin/testdata/method2/main.go

    // A type can be passed to a plugin and converted to interface
    // there. So its methods need to be live.
    
    package main
    
    import (
    	"plugin"
    
    	"testplugin/method2/p"
    )
    
    var t p.T
    
    type I interface{ M() }
    
    func main() {
    	pl, err := plugin.Open("method2.so")
    	if err != nil {
    		panic(err)
    	}
    
    	f, err := pl.Lookup("F")
    	if err != nil {
    		panic(err)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 549 bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/testplugin/testdata/method3/main.go

    // An unexported method can be reachable from the plugin via interface
    // when a package is shared. So it need to be live.
    
    package main
    
    import (
    	"plugin"
    
    	"testplugin/method3/p"
    )
    
    var i p.I
    
    func main() {
    	pl, err := plugin.Open("method3.so")
    	if err != nil {
    		panic(err)
    	}
    
    	f, err := pl.Lookup("F")
    	if err != nil {
    		panic(err)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 533 bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/testcshared/testdata/main0.c

    #include "p.h"
    #include "libgo.h"
    
    // Tests libgo.so to export the following functions.
    //   int8_t DidInitRun();
    //   int8_t DidMainRun();
    //   int32_t FromPkg();
    //   uint32_t Divu(uint32_t, uint32_t);
    int main(void) {
      int8_t ran_init = DidInitRun();
      if (!ran_init) {
        fprintf(stderr, "ERROR: DidInitRun returned unexpected results: %d\n",
                ran_init);
        return 1;
      }
      int8_t ran_main = DidMainRun();
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  7. platforms/documentation/docs/src/snippets/toolingApi/runBuild/groovy/src/main/java/org/gradle/sample/Main.java

    package org.gradle.sample;
    
    import org.gradle.tooling.BuildLauncher;
    import org.gradle.tooling.GradleConnector;
    import org.gradle.tooling.ProjectConnection;
    
    import java.io.File;
    
    public class Main {
        public static void main(String[] args) {
            // Configure the connector and create the connection
            GradleConnector connector = GradleConnector.newConnector();
    
            if (args.length > 0) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  8. test/typeparam/pairimp.dir/main.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"./a"
    	"fmt"
    	"unsafe"
    )
    
    func main() {
    	p := a.Pair[int32, int64]{1, 2}
    	if got, want := unsafe.Sizeof(p.Field1), uintptr(4); got != want {
    		panic(fmt.Sprintf("unexpected f1 size == %d, want %d", got, want))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 716 bytes
    - Viewed (0)
  9. pilot/cmd/pilot-discovery/main.go

    // See the License for the specific language governing permissions and
    // limitations under the License.
    
    package main
    
    import (
    	"os"
    
    	"istio.io/istio/pilot/cmd/pilot-discovery/app"
    	"istio.io/istio/pkg/log"
    )
    
    func main() {
    	log.EnableKlogWithCobra()
    	rootCmd := app.NewRootCommand()
    	if err := rootCmd.Execute(); err != nil {
    		log.Error(err)
    		os.Exit(-1)
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 846 bytes
    - Viewed (0)
  10. test/typeparam/absdiffimp2.dir/main.go

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"./a"
    	"fmt"
    )
    
    func main() {
    	if got, want := a.OrderedAbsDifference(1.0, -2.0), 3.0; got != want {
    		panic(fmt.Sprintf("got = %v, want = %v", got, want))
    	}
    	if got, want := a.OrderedAbsDifference(-1.0, 2.0), 3.0; got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 879 bytes
    - Viewed (0)
Back to top